|
ActionAdventureKit 1.9.3
|
plays an animation clip or controller on an animator using a playable graph(like a timeline)
the original animation continues in the background and gets faded out and back in at the end
playing animations that are not part of a characters animator this way allows decoupling actions
for example when the animation for pulling a lever is configured in ObjectAction.CharacterAnimation
any arbitrary (humanoid)character can use that lever without having the animation in its controller
Public Member Functions | |
| override void | PrepareFrame (Playable playable, FrameData info) |
| void | Play () |
| starts or restarts the animation | |
| void | Cancel () |
| requests for the animation to stop, LeadOut is still done before finishing | |
| void | Stop () |
| immediately stops the animation | |
| void | Destroy () |
| destroys the animation | |
| virtual void | SetTrigger (string name) |
| sets a trigger if the animation is playing a controller | |
| virtual void | SetBool (string name, bool value) |
| sets a bool if the animation is playing a controller | |
| virtual void | SetInt (string name, int value) |
| sets an int if the animation is playing a controller | |
| virtual void | SetFloat (string name, float value) |
| sets a float if the animation is playing a controller | |
| virtual void | SetState (string name) |
| plays a state if the animation is playing a controller | |
| virtual void | SetTrigger (int id) |
| sets a trigger if the animation is playing a controller | |
| virtual void | SetBool (int id, bool value) |
| sets a bool if the animation is playing a controller | |
| virtual void | SetInt (int id, int value) |
| sets an int if the animation is playing a controller | |
| virtual void | SetFloat (int id, float value) |
| sets a float if the animation is playing a controller | |
| virtual void | SetState (int id) |
| plays a state if the animation is playing a controller | |
Static Public Member Functions | |
| static PlayableAnimation | Play (PlayableAnimationParameters parameters, Animator target, CharacterBase character=null, Action< PlayableAnimation > finished=null, bool oneShot=true, string name=null) |
| creates a new animation and immediately plays it | |
| static PlayableAnimation | Create (PlayableAnimationParameters parameters, Animator target, CharacterBase character=null, Action< PlayableAnimation > finished=null, bool oneShot=false, string name=null) |
| creates a new animation | |
Properties | |
| PlayableAnimationParameters | Parameters [get] |
| the parameters used to create this animation | |
| CharacterBase | Character [get] |
| character the animation is played on, only used to send instructions | |
| Animator | Target [get] |
| target animator the animation runs on | |
| Playable | Playable [get] |
| reference to the playable of this behaviour | |
| AnimationClipPlayable | Clip [get] |
| the playable that provides the animation when playing a clip | |
| AnimatorControllerPlayable | Controller [get] |
| the playable that provides and controls the animation when playing a controller | |
| AnimationLayerMixerPlayable | MaskMixer [get] |
| when a PlayableAnimationParameters.Mask is configured this mixer is used to apply it | |
| AnimationPlayableOutput | Output [get] |
| the playable output for the animation | |
| HashSet< int > | EndStates [get] |
| the PlayableAnimationParameters.EndStates used to determine if the controller is ending in hash form | |
| bool | IsPlaying [get] |
| whether the animation is currently playing | |
| bool | IsFinished [get] |
| whether the animation has fully finished playing | |
Events | |
| Action< PlayableAnimation > | Finished |
| fired when the animation is done playing and has transitioned out | |
|
inlinestatic |
creates a new animation
| parameters | animation setting including the animation clip or controller |
| target | the animator to play the animation on |
| finished | executed when the animation is finished playing |
| oneShot | whether the animation is automatically destroyed when finished, when false the animation can be reused but has to be destroyed by the consumer |
| name | name of the graph that is displayed in graph visualizers |
|
inlinestatic |
creates a new animation and immediately plays it
| parameters | animation setting including the animation clip or controller |
| target | the animator to play the animation on |
| finished | executed when the animation is finished playing |
| oneShot | whether the animation is automatically destroyed when finished, when false the animation can be reused but has to be destroyed by the consumer |
| name | name of the graph that is displayed in graph visualizers |
|
inlinevirtual |
sets a bool if the animation is playing a controller
| id | hashed parameter |
| value | the new parameter value |
|
virtual |
sets a bool if the animation is playing a controller
| name | parameter name |
| value | the new parameter value |
|
inlinevirtual |
sets a float if the animation is playing a controller
| id | hashed parameter |
| value | the new parameter value |
|
virtual |
sets a float if the animation is playing a controller
| name | parameter name |
| value | the new parameter value |
|
inlinevirtual |
sets an int if the animation is playing a controller
| id | hashed parameter |
| value | the new parameter value |
|
virtual |
sets an int if the animation is playing a controller
| name | parameter name |
| value | the new parameter value |
|
inlinevirtual |
plays a state if the animation is playing a controller
| id | hashed state name |
|
virtual |
plays a state if the animation is playing a controller
| name | parameter name |
|
inlinevirtual |
sets a trigger if the animation is playing a controller
| id | hashed parameter |
|
virtual |
sets a trigger if the animation is playing a controller
| name | parameter name |