Toolbox 0.0.1
Ritchie's accessible game engine'
Loading...
Searching...
No Matches
Animation< TValue > Class Template Referenceabstract

Base class for any transition between two values of type TValue . More...

Inheritance diagram for Animation< TValue >:
Animation IAnimation IAnimationHandle

Protected Member Functions

 Animation (CurveFunction curve, float duration, InterpolationFunction< TValue > interpolator, TValue from, TValue to, Action< TValue > callback)
 Creates a new instance of the Animation<TValue> class.
 
override void OnUpdate (float transitionPercentage)
 
- Protected Member Functions inherited from Animation
 Animation (CurveFunction curve, float duration)
 Creates a new instance of the Animation class.
 
void OnUpdate (float transitionPercentage)
 Method that's called each time the animation is updated.
 

Additional Inherited Members

- Public Member Functions inherited from Animation
void Update (float time)
 Update the animation with a new frame.
Parameters
deltaSecondsThe amount of time, in seconds, that has passed since the last animation frame.

 
IAnimationHandle Start ()
 <inhertdoc >
 
void Cancel ()
 Cancel the animation.
 
IAnimationHandle WhileActive (IAnimationUpdateAction updateAction)
 Adds an action to be executed each time the animation updates.
Parameters
updateActionAny type implementing IAnimationUpdateAction.
Returns
The animation.

 
IAnimationHandle Then (IAnimation nextAnimation)
 Adds the specified animation to the list of animations to start after this one has completed.
Parameters
nextAnimationAny animation.
Returns
This animation.

 
- Properties inherited from Animation
IEnumerable< IAnimationNextAnimations [get]
 Gets a collection of animations that will be started after this one finishes.
 
bool IsCompleted [get]
 Gets a value indicating whether an animation has completed.
 
bool IsActive [get]
 Gets a value indicating whhether the animation is active.
 
bool IsCancelled [get]
 Gets a value indicating whether an animation has been cancelled.
 

Detailed Description

Base class for any transition between two values of type TValue .

Template Parameters
TValueThe type of value being transitioned. Only value types are permitted.
Type Constraints
TValue :struct 

Member Function Documentation

◆ Animation()

Animation ( CurveFunction curve,
float duration,
InterpolationFunction< TValue > interpolator,
TValue from,
TValue to,
Action< TValue > callback )
inlineprotected

Creates a new instance of the Animation<TValue> class.

Parameters
curveThe curve function to use for blending between the from and to values.
durationThe duration, in seconds, of the transition.
interpolatorA compatible InterpolationFunction<TValue> method.
fromThe value to start from.
toThe value to blend toward.
callbackA callback to be executed at each step of the transition.

The documentation for this class was generated from the following file: