AvatarReady
Loading...
Searching...
No Matches
Inria.Avatar.AvatarReady.AvatarReadyAnimationPlayer Class Referenceabstract

Abstract class for animation players. Each player define a way of playing an animation on an animator. More...

Inheritance diagram for Inria.Avatar.AvatarReady.AvatarReadyAnimationPlayer:
Inria.Avatar.AvatarReady.AnimationClipPlayer Inria.Avatar.AvatarReady.AnimationControllerPlayer Inria.Avatar.AvatarReady.AnimationJsonPlayer Inria.Avatar.AvatarReady.AnimationTrackerJson

Public Member Functions

 AvatarReadyAnimationPlayer (string path, Animator animator)
 Create a player for a type of animation.
 
virtual void PlayAnimation (bool fromStart=true)
 Check if animation is ready to play and start playing.
 
virtual void UpdateAnimation ()
 Called every frame.
 
void UpdatePose (float deltaTime=0)
 Update pose of the avatar. If logic needs to run every frame while the animation is playing, set it here.
 
void ClearAnimation ()
 Called before ending the player. Is called when on behaviour's OnDisable or when player is changed.
 
float GetDuration ()
 Get duration of the Animation.
 
float GetCurrentTime ()
 Get current time of the animation.
 
void SetCurrentTime (float time)
 Set the current time of the animation.
 
void PauseAnimation ()
 Pause the animation being played.
 

Public Attributes

bool IsInitialized
 
bool IsPlaying
 
bool IsLoop
 

Protected Member Functions

bool SetupAnimation ()
 Fetch animation asset and get things ready for play.
 
void SetAnimationAtStart ()
 Set the animation at start.
 
void LoopAnimation ()
 Check if animation has finished and/or set animation at start.
 

Protected Attributes

string path
 
Animator animator
 

Properties

string Path [get]
 

Detailed Description

Abstract class for animation players. Each player define a way of playing an animation on an animator.

Constructor & Destructor Documentation

◆ AvatarReadyAnimationPlayer()

Inria.Avatar.AvatarReady.AvatarReadyAnimationPlayer.AvatarReadyAnimationPlayer ( string path,
Animator animator )
inline

Create a player for a type of animation.

Parameters
pathname of the animation source to use. Full path is generated depending of the animation type
animatorAnimator of the avatar to play the animation on

Member Function Documentation

◆ SetupAnimation()

bool Inria.Avatar.AvatarReady.AvatarReadyAnimationPlayer.SetupAnimation ( )
abstractprotected

Fetch animation asset and get things ready for play.

Returns
Result of the setup

◆ PlayAnimation()

virtual void Inria.Avatar.AvatarReady.AvatarReadyAnimationPlayer.PlayAnimation ( bool fromStart = true)
inlinevirtual

Check if animation is ready to play and start playing.

Parameters
fromStartSet the animation back to start before playing

Reimplemented in Inria.Avatar.AvatarReady.AnimationClipPlayer.

◆ UpdateAnimation()

virtual void Inria.Avatar.AvatarReady.AvatarReadyAnimationPlayer.UpdateAnimation ( )
inlinevirtual

Called every frame.

Reimplemented in Inria.Avatar.AvatarReady.AnimationClipPlayer.


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