Class NodeAnimation
Animates a node's position.
public class NodeAnimation : IAnimation
- Inheritance
-
NodeAnimation
- Implements
- Inherited Members
Constructors
NodeAnimation(Node, Point, double, Func<double, double>?, Action?)
Creates a new node position animation.
public NodeAnimation(Node node, Point targetPosition, double duration = 0.3, Func<double, double>? easing = null, Action? onComplete = null)
Parameters
nodeNodeThe node to animate.
targetPositionPointTarget position.
durationdoubleAnimation duration in seconds.
easingFunc<double, double>Easing function (defaults to EaseOutCubic).
onCompleteActionCallback when animation completes.
Properties
IsComplete
Gets whether the animation has completed.
public bool IsComplete { get; }
Property Value
Methods
Cancel()
Called when the animation completes or is cancelled.
public void Cancel()
Update(double)
Updates the animation with the elapsed time since the last frame.
public void Update(double deltaTime)
Parameters
deltaTimedoubleTime elapsed since last update in seconds.