fix: added missing types for new primitives

This commit is contained in:
2025-10-19 19:03:30 +03:00
parent f8096377b2
commit b42f1f1881
19 changed files with 526 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
using Engine.Core;
namespace Engine.Systems.Tween;
public static class TweenVector4DExtensions
{
private static readonly BoxedPool<Vector4D> boxedVector4DPool = new(2);
public static ITween TweenVector4D(this Vector4D initialVector4D, ITweenManager tweenManager, float duration, Vector4D targetVector4D, System.Action<Vector4D> setMethod)
{
Boxed<Vector4D> boxedInitial = boxedVector4DPool.Get(initialVector4D);
Boxed<Vector4D> boxedTarget = boxedVector4DPool.Get(targetVector4D);
ITween tween = tweenManager.StartTween(duration, t => setMethod?.Invoke(boxedInitial.Value.Lerp(boxedTarget.Value, t)));
tween.OnComplete(() =>
{
boxedVector4DPool.Return(boxedInitial);
boxedVector4DPool.Return(boxedTarget);
});
return tween;
}
}