Class EdgeRainbowAnimation
Cycles through rainbow colors continuously for a colorful effect.
public class EdgeRainbowAnimation : IAnimation
- Inheritance
-
EdgeRainbowAnimation
- Implements
- Inherited Members
Constructors
EdgeRainbowAnimation(Edge, double, Action<Edge, Color>?, double?)
Creates a new rainbow color animation.
public EdgeRainbowAnimation(Edge edge, double cycleSpeed = 0.5, Action<Edge, Color>? onUpdate = null, double? maxDuration = null)
Parameters
edgeEdgeThe edge to animate.
cycleSpeeddoubleHow fast to cycle through colors (1.0 = one full cycle per second).
onUpdateAction<Edge, Color>Callback called each frame with the edge and current color.
maxDurationdouble?Maximum duration in seconds, or null for infinite.
Properties
CurrentColor
Gets the current color.
public Color CurrentColor { get; }
Property Value
- Color
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.