JugiMap Framework
AnimationPlayer Class Reference

The standard animation player for playing animations via AnimationInstance objects. More...

#include <jmAnimationCommon.h>

Public Member Functions

AnimationInstanceGetAnimationInstance ()
 Returns the played animation instance. More...
 
int GetCurrentAnimationTime ()
 Returns the current animation time in milliseconds. More...
 
AnimationPlayerState GetState ()
 Returns the state of this player. More...
 
AKMeta * GetActiveMetaKey ()
 Returns the active meta key of the played animation or nullptr if none. More...
 
int Play (AnimationInstance *_animationInstance)
 Play the given *_animationInstance*. More...
 
void Pause ()
 Pause this player. More...
 
void Resume ()
 Resume this player. More...
 
int Stop ()
 Stop the played animation and put the player into the idle state. More...
 
int Update ()
 Update the player. This command must be called in every update loop of the game logic. More...
 
void SetParametersForCompletingLoop ()
 This command modify the player parameters so that it will go into the AnimationPlayerState:STALLED state after the currently played loop. More...
 
AnimationBaseParametersGetAnimationBaseParameters ()
 Returns a reference to the animation base parameters. More...
 

Detailed Description

The standard animation player for playing animations via AnimationInstance objects.

Member Function Documentation

◆ GetAnimationInstance()

AnimationInstance* GetAnimationInstance ( )
inline

Returns the played animation instance.

◆ GetCurrentAnimationTime()

int GetCurrentAnimationTime ( )
inline

Returns the current animation time in milliseconds.

◆ GetState()

AnimationPlayerState GetState ( )
inline

Returns the state of this player.

◆ GetActiveMetaKey()

AKMeta* GetActiveMetaKey ( )
inline

Returns the active meta key of the played animation or nullptr if none.

◆ Play()

int Play ( AnimationInstance _animationInstance)

Play the given *_animationInstance*.

◆ Pause()

void Pause ( )

Pause this player.

◆ Resume()

void Resume ( )

Resume this player.

◆ Stop()

int Stop ( )

Stop the played animation and put the player into the idle state.

To change the played animation there is no need to call this command. The Play command will stop any played animation before starting a new one.

◆ Update()

int Update ( )

Update the player. This command must be called in every update loop of the game logic.

◆ SetParametersForCompletingLoop()

void SetParametersForCompletingLoop ( )

This command modify the player parameters so that it will go into the AnimationPlayerState:STALLED state after the currently played loop.

This command is used by the AnimationQueuePlayer.

◆ GetAnimationBaseParameters()

AnimationBaseParameters& GetAnimationBaseParameters ( )
inline

Returns a reference to the animation base parameters.

Animation base parameters stored in the player are copy of parameters from animation instance.


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