Class SingleCycleAnimator
The performer responsible for playing single cycle animations.
Namespace : SpriteAnimations
Fields
_singleAnimation
protected SpriteAnimationSingleCycle _singleAnimation
Field Value
Methods
EndAnimation()
Use this to stop playing the animation. Cannot use StopAnimation() because of events being cleared.
protected void EndAnimation()
EndCycle()
Ends the current cycle. In case the animation is loopable, it restarts the cycle. Case the animation is not a loop, it ends the animation.
protected void EndCycle()
FromStart()
Resets the current animation cycle and starts playing the single cycle animation from the start.
public SingleCycleAnimator FromStart()
Returns
- SingleCycleAnimator
The updated SingleCycleAnimator instance.
ResetCycle()
Resets the cycle.
protected void ResetCycle()
StartAnimation(SpriteAnimation)
Must be called to start playing an animation
public override void StartAnimation(SpriteAnimation animation)
Parameters
animation
SpriteAnimation
StopAnimation()
Must be called every time the animation should be stopped.
public override void StopAnimation()
Tick(float)
Evaluates what frame should be displayed based on the current cycle. This also handles the animation cycles.
public override void Tick(float deltaTime)
Parameters
deltaTime
float