Tweener<T, U>

Inherits from Tween

Declaration

public class Tweener<T, U> : Tween

Description

A tween that animates a parameter over time on an object from a start value to an end value.

Type Parameters

TThe type of object to tween.
UThe type of parameter to tween.

Properties

targetThe object being tweened.
getterThe function that gets the current value of the parameter being tweened.
setterThe function that sets a new value of the parameter being tweened.
interpolaterThe function that interpolates values between the tween's start and end value.
startValueThe initial value of the parameter at the start of the tween.
endValueThe desired value of the parameter at the end of the tween.

Constructors

TweenerCreates a new tweener.
Inherited

Properties

idAn identifier that can be used to distinguish the tween from others. This is not explicitly required nor is it necessarily unique. The id is often used to identify which object the parameter being animated belongs to, and often that object is animating multiple parameters.
sceneIndexThe index of the scene that contains the object being animated by the tween. The is used to kill the tween when the scene is unloaded.
StateThe animation state of the tween.
IsPlayingWhether the tween is playing.
IsStoppedWhether the tween is stopped.
IsCompleteWhether the tween is complete.
IsKilledWhether the tween is killed.
easeThe easing function type used by the tween to animate values.
durationThe amount of seconds the tween takes to complete.
ElapsedThe amount of seconds that have elapsed since the tween started.
PercentCompleteThe tween's percentage of completion.
delayThe amount of seconds the tween waits before playing after being started.
DelayElapsedThe amount of seconds that have elapsed during the tween's delayed state, when applicable.
IsDelayedWhether the tween is currently in a delayed state, i.e., the tween has been started but the elapsed time has not exceeded the delay duration.
loopsThe number of times the tween loops. A value of -1 will loop the tween infinitely.
loopTypeThe style in which the tween loops.
IterationsThe number of times the tween has completed.
reversedAnimates from the end value to the start value as opposed to animating from the start value to the end value like normal.
snappingSmoothly snaps all interpolated values to whole numbers.
recyclableKeeps the tween in memory to be re-used after being killed.
autoStartAutomatically starts the tween after being created.
autoKillAutomatically kills the tween after being completed.
eventHandlerAn event handler that responds to lifecycle events of the tween.
Inherited

Methods

AnimateAnimates the parameter being tweened to the current state.
PlayPlays the tween, whether starting for the first time or resuming from a stopped state.
StopStops the tween if currently being played.
CompleteCompletes the tween, jumping to the end value.
KillKills the tween in its place, preventing any further state changes or changes to the parameter being animated.
RestartRestarts the tween as along as it has not been killed.