Class Vector2Animation
Defines an animation that blends between two 2D vectors.
Inherited Members
Namespace: Ritchie.Toolbox.Animation
Assembly: Ritchie.Toolbox.dll
Syntax
public sealed class Vector2Animation : Animation<Vector2>, IAnimation, IAnimationHandle
Constructors
Vector2Animation(CurveFunction, float, Vector2, Vector2, Action<Vector2>)
Defines an animation that blends between two 2D vectors.
Declaration
public Vector2Animation(CurveFunction curveFunction, float duration, Vector2 from, Vector2 to, Action<Vector2> callback)
Parameters
Type | Name | Description |
---|---|---|
CurveFunction | curveFunction | The curve function to use for the animation. |
float | duration | The length, in seconds, of the animation. |
Vector2 | from | The value to start from. |
Vector2 | to | The value to blend toward. |
Action<Vector2> | callback | A callback to execute on each animation step. |