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

Base class for all animations. More...

Inheritance diagram for Animation:
IAnimation IAnimationHandle Animation< TValue >

Public Member Functions

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.

 

Protected Member Functions

 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.
 

Properties

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 all animations.

See also
IAnimation, Animation<TValue>, IAnimationHandle

Constructor & Destructor Documentation

◆ Animation()

Animation ( CurveFunction curve,
float duration )
inlineprotected

Creates a new instance of the Animation class.

Parameters
curveThe curve function to use for the animation.
durationThe duration, in seconds, of the animation.

Member Function Documentation

◆ Cancel()

void Cancel ( )
inline

Cancel the animation.

Implements IAnimationHandle.

◆ OnUpdate()

void OnUpdate ( float transitionPercentage)
abstractprotected

Method that's called each time the animation is updated.

Parameters
transitionPercentageA value between 0.0 and 1.0 representing the animation's progress.

◆ Start()

IAnimationHandle Start ( )
inline

<inhertdoc >

Implements IAnimationHandle.

◆ Then()

IAnimationHandle Then ( IAnimation nextAnimation)
inline

Adds the specified animation to the list of animations to start after this one has completed.

Parameters
nextAnimationAny animation.
Returns
This animation.

Implements IAnimationHandle.

◆ Update()

void Update ( float time)
inline

Update the animation with a new frame.

Parameters
deltaSecondsThe amount of time, in seconds, that has passed since the last animation frame.

Implements IAnimation.

◆ WhileActive()

IAnimationHandle WhileActive ( IAnimationUpdateAction updateAction)
inline

Adds an action to be executed each time the animation updates.

Parameters
updateActionAny type implementing IAnimationUpdateAction.
Returns
The animation.

Implements IAnimationHandle.

Property Documentation

◆ IsActive

bool IsActive
get

Gets a value indicating whhether the animation is active.

Implements IAnimationHandle.

◆ IsCancelled

bool IsCancelled
get

Gets a value indicating whether an animation has been cancelled.

Implements IAnimationHandle.

◆ IsCompleted

bool IsCompleted
get

Gets a value indicating whether an animation has completed.

Implements IAnimationHandle.

◆ NextAnimations

IEnumerable<IAnimation> NextAnimations
get

Gets a collection of animations that will be started after this one finishes.

Implements IAnimation.


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