Show / Hide Table of Contents

Class AnimatedValue

An function that applies an EasingBase function between two values.

Inheritance
object
UpdateComponent
InstructionBase
Wait
AnimatedValue
FadeTextSurfaceTint
Implements
IComponent
Inherited Members
Wait.CountedTime
Wait.Duration
InstructionBase.Repeat()
InstructionBase.OnFinished(IScreenObject)
InstructionBase.OnRepeating()
InstructionBase.OnStarted()
InstructionBase.RemoveOnFinished
InstructionBase.IsFinished
InstructionBase.RepeatCount
InstructionBase.Started
InstructionBase.Finished
InstructionBase.Repeating
UpdateComponent.OnAdded(IScreenObject)
UpdateComponent.OnRemoved(IScreenObject)
UpdateComponent.SortOrder
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.Instructions
Assembly: SadConsole.dll
Syntax
public class AnimatedValue : Wait, IComponent

Constructors

AnimatedValue(TimeSpan, double, double, EasingBase?)

Creates a new value animated over time.

Declaration
public AnimatedValue(TimeSpan duration, double startingValue, double endingValue, EasingBase? easingFunction = null)
Parameters
Type Name Description
TimeSpan duration

The total time this animation should run.

double startingValue

The starting value of the animation.

double endingValue

The ending value of the animation.

EasingBase easingFunction

The easing function used during animation. Defaults to Linear.

Fields

EasingFunction

The easing function assigned to animate the value.

Declaration
protected EasingBase EasingFunction
Field Value
Type Description
EasingBase

Properties

EndingValue

The ending value of the animation.

Declaration
public double EndingValue { get; }
Property Value
Type Description
double

StartingValue

The stating value of the animation.

Declaration
public double StartingValue { get; }
Property Value
Type Description
double

Value

The current or last value of the animation.

Declaration
public double Value { get; }
Property Value
Type Description
double

Methods

Reset()

Resets the Done flag.

Declaration
public override void Reset()
Overrides
Wait.Reset()
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.

Reset(TimeSpan, double, double, EasingBase?)

Resets this object to new values.

Declaration
public void Reset(TimeSpan duration, double startingValue, double endingValue, EasingBase? easingFunction = null)
Parameters
Type Name Description
TimeSpan duration

The total time this animation should run.

double startingValue

The starting value of the animation.

double endingValue

The ending value of the animation.

EasingBase easingFunction

The easing function used during animation. Defaults to Linear.

Update(IScreenObject, TimeSpan)

Updates the timer with the time since the last call.

Declaration
public override void Update(IScreenObject console, TimeSpan delta)
Parameters
Type Name Description
IScreenObject console

The parent object.

TimeSpan delta

The time since the last frame update.

Overrides
Wait.Update(IScreenObject, TimeSpan)

Events

ValueChanged

Raised when the instruction is running and the value changes during Update(IScreenObject, TimeSpan).

Declaration
public event EventHandler<double>? ValueChanged
Event Type
Type Description
EventHandler<double>

Implements

IComponent

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX