feat: added engine member tween extensions

This commit is contained in:
2025-05-03 22:23:52 +03:00
parent a93e55619c
commit be2295b92d
13 changed files with 218 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
using Syntriax.Engine.Core;
namespace Syntriax.Engine.Systems.Tween;
public static class TweenCamera2DExtensions
{
public static ITween TweenZoom(this ICamera2D camera2D, ITweenManager tweenManager, float duration, float targetZoom)
{
float initialZoom = camera2D.Zoom;
return tweenManager.StartTween(duration, t => camera2D.Zoom = initialZoom.Lerp(targetZoom, t));
}
}