AnimatedValue Class
Definition
Section titled “Definition”An function that applies an EasingBase function between two values.
public class AnimatedValue : Wait, IComponentInheritance object → UpdateComponent → InstructionBase → Wait
Implements IComponent
Constructors
Section titled “Constructors”AnimatedValue(TimeSpan, double, double, EasingBase?)
Section titled “AnimatedValue(TimeSpan, double, double, EasingBase?)”Creates a new value animated over time.
public AnimatedValue(TimeSpan duration, double startingValue, double endingValue, EasingBase? easingFunction = null)Parameters
Section titled “Parameters”duration TimeSpan
The total time this animation should run.
startingValue double
The starting value of the animation.
endingValue double
The ending value of the animation.
easingFunction EasingBase
The easing function used during animation. Defaults to Linear.
Fields
Section titled “Fields”EasingFunction
Section titled “EasingFunction”The easing function assigned to animate the value.
protected EasingBase EasingFunctionProperties
Section titled “Properties”The current or last value of the animation.
public double Value { get; }StartingValue
Section titled “StartingValue”The stating value of the animation.
public double StartingValue { get; }EndingValue
Section titled “EndingValue”The ending value of the animation.
public double EndingValue { get; }Methods
Section titled “Methods”Reset(TimeSpan, double, double, EasingBase?)
Section titled “Reset(TimeSpan, double, double, EasingBase?)”Resets this object to new values.
public void Reset(TimeSpan duration, double startingValue, double endingValue, EasingBase? easingFunction = null)Parameters
Section titled “Parameters”duration TimeSpan
The total time this animation should run.
startingValue double
The starting value of the animation.
endingValue double
The ending value of the animation.
easingFunction EasingBase
The easing function used during animation. Defaults to Linear.
Reset()
Section titled “Reset()”Resets the Done flag.
public override void Reset()Remarks
Section titled “Remarks”On the base class, resets the IsFinished to false. Override this method to reset the derived class’ counters and status flags for the instruction.
Update(IScreenObject, TimeSpan)
Section titled “Update(IScreenObject, TimeSpan)”Updates the timer with the time since the last call.
public override void Update(IScreenObject console, TimeSpan delta)Parameters
Section titled “Parameters”console IScreenObject
The parent object.
delta TimeSpan
The time since the last frame update.
Events
Section titled “Events”ValueChanged
Section titled “ValueChanged”Raised when the instruction is running and the value changes during Update(IScreenObject, TimeSpan).
public event EventHandler<double>? ValueChanged