refactor: easings have a singleton base so we don't create an unnecessary instance or cache everytime

This commit is contained in:
2025-05-03 22:38:40 +03:00
parent be2295b92d
commit fd11a94ddf
2 changed files with 39 additions and 35 deletions

View File

@@ -43,7 +43,7 @@ internal class Tween : ITween
public float Progress { get; internal set; } = 0f;
private float _counter = 0f;
public IEasing Easing { get; set; } = new EaseLinear();
public IEasing Easing { get; set; } = EaseLinear.Instance;
public float Value => Easing.Evaluate(Progress);
public float Counter