API ‐ StateAnimator - StarLightShadowsX/HierarchyStateMachine GitHub Wiki
StateAnimator
A behavior that manages animation states within a StateMachine.
Inherits from : StateBehavior
Properties
EntryAnimAction onEntry { public get; public set; }
Defines the type of animation action to perform when entering a state.
string onEnterName { public get; public set; }
The name of the animation to play, crossfade, or trigger.
float onEnterTime { public get; public set; }
The duration of the crossfade animation.
bool doWhenNotFinal { public get; public set; }
Indicates whether the animation should be performed when the state is not final.
Animator animator { public get; public set; }
The Animator
component used to control animations.
Methods
void Play(string)
Plays the specified animation.
Parameters:
- string name : The name of the animation to play.
void CrossFade(string, float)
Crossfades to the specified animation over a given duration.
Parameters:
string
name : The name of the animation to crossfade to.float
time : The duration of the crossfade.
void Trigger(string)
Triggers the specified animation.
Parameters:
string
name : The name of the animation trigger.
void PlayAtCurrentPoint(string)
Plays the specified animation starting at the current normalized time of the animator.
Parameters:
string
name : The name of the animation to play.
void CrossFadeAtCurrentPoint(string, float)
Crossfades to the specified animation starting at the current normalized time of the animator.
Parameters:
string
name : The name of the animation to crossfade to.float
time : The duration of the crossfade.