Skip to content

TransformAnimation

Matthew Daly edited this page Feb 12, 2023 · 4 revisions

Namespace: Verdant

class TransformAnimation

public class TransformAnimation

Smoothly animates between two TransformStates, according to a TimingFunction.

Navigate

Properties

Property Description
From The initial TransformState (it will be filled backwards even if the animation hasn't started).
To The final TransformState.
Multiply True if either the starting or ending TransformState are multiplicative.
Running Indicates if the TransformAnimation is currently running.
Complete Indicates if the TransformAnimation is complete.
FillForwards Determines if the final TransformState should fill forwards when the animation is complete.

Constructors

public TransformAnimation

public TransformAnimation(TransformState from, TransformState to, float duration)

Initialize a new TransformAnimation.

Parameter Description
TransformState from The beginning TransformState.
TransformState to The ending TransformState.
float duration The duration of the animation (ms).

public TransformAnimation

public TransformAnimation(TransformState from, TransformState to, float duration, TimingFunction timingFunction)

Initialize a new TransformAnimation.

Parameter Description
TransformState from The beginning TransformState.
TransformState to The ending TransformState.
float duration The duration of the animation (ms).
TimingFunction timingFunction The timing function of the animation.

public TransformAnimation

private TransformAnimation(TransformState from, TransformState to, float duration, TimingFunction timingFunction, TransformState diff)
Parameter Description
TransformState from
TransformState to
float duration
TimingFunction timingFunction
TransformState diff

Methods

void AnimationTimerCallback

private void AnimationTimerCallback(Timer t)
Parameter Description
Timer t

void Start

public void Start()

Start the TransformAnimation.

TransformState GetFrame

public TransformState GetFrame()

Get the current state of the TransformAnimation.

Returns: A TransformState with properties representing the current state of the TransformAnimation.

TransformAnimation Copy

public TransformAnimation Copy()

Create a new TransformAnimation with the same properties as this one.

Returns: A new TransformAnimation.

Clone this wiki locally