RavEngine
Loading...
Searching...
No Matches
RavEngine::AnimatorComponent::Layer Struct Reference

Public Member Functions

 Layer (const Layer &)=delete
 
 Layer (Layer &&)=default
 
 Layer (const Ref< SkeletonMask > &mask)
 
void Goto (anim_id_t newState, bool skipTransition=false)
 
void InsertState (const State &state)
 
void Play (float resetPlayhead=false)
 
void Pause ()
 
void UpdateBuffers (const Ref< SkeletonAsset > &skeleton)
 
auto GetCurrentState () const
 
void SetSkeletonMask (Ref< SkeletonMask > mask)
 
auto & GetSkeletonMask () const
 
void SetWeight (float w)
 
float GetWeight () const
 
bool SetAdditive (bool additive)
 

Friends

class AnimatorComponent
 

Member Function Documentation

◆ GetCurrentState()

auto RavEngine::AnimatorComponent::Layer::GetCurrentState ( ) const
inline
Returns
the ID of the state the animator is currently playing

◆ Goto()

void RavEngine::AnimatorComponent::Layer::Goto ( anim_id_t  newState,
bool  skipTransition = false 
)

Transitions to the new state. If the current state has a transition to the target state, that transition is played. Otherwise, the state machine simply jumps to the target state without a transition.

Parameters
newStatethe state to switch to

◆ InsertState()

void RavEngine::AnimatorComponent::Layer::InsertState ( const State &  state)
inline

Add a state to the state machine

Parameters
statethe state to insert

◆ Play()

void RavEngine::AnimatorComponent::Layer::Play ( float  resetPlayhead = false)

Begin playing this AnimatorController

Parameters
resetPlayheadtrue if the time of this animator should be reset (for nonlooping animations), false to resume where paused (for looping animations)

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