Loading...
Searching...
No Matches
AdventureCore.PlayableAnimationParameters Class Reference

Detailed Description

parameters for PlayableAnimation that are used in behaviours and shown in the inspector

Public Member Functions

PlayableAnimation Play (CharacterBase character, Action< PlayableAnimation > finished=null, bool oneShot=true, string name=null)
 creates a new animation using these parameters and immediately plays it
 
PlayableAnimation Play (CharacterActionBase action, Action< PlayableAnimation > finished=null, bool oneShot=true, string name=null)
 creates a new animation using these parameters and immediately plays it
 
PlayableAnimation Play (Animator target, CharacterBase character=null, Action< PlayableAnimation > finished=null, bool oneShot=true, string name=null)
 creates a new animation using these parameters and immediately plays it
 
PlayableAnimation Create (CharacterBase character, Action< PlayableAnimation > finished=null, bool oneShot=false, string name=null)
 creates a new animation using these parameters
 
PlayableAnimation Create (CharacterActionBase action, Action< PlayableAnimation > finished=null, bool oneShot=false, string name=null)
 creates a new animation using these parameters
 
PlayableAnimation Create (Animator target, CharacterBase character=null, Action< PlayableAnimation > finished=null, bool oneShot=false, string name=null)
 creates a new animation using these parameters
 

Public Attributes

AnimationClip Clip
 
RuntimeAnimatorController Controller
 
float Delay
 
float Speed = 1f
 
float LeadIn = 0.1f
 
float LeadOut = 0.1f
 
float Weight = 1f
 
AvatarMask Mask
 
bool Additive
 
CharacterInstructionBase[] Instructions
 
PlayableAnimationMessage[] Messages
 
bool Loop
 
float StartTime = 0.0f
 
float EndTime = 1.0f
 
string StartState
 
string EndState
 

Properties

float SpeedAbs [get]
 

Member Function Documentation

◆ Create() [1/3]

PlayableAnimation AdventureCore.PlayableAnimationParameters.Create ( Animator target,
CharacterBase character = null,
Action< PlayableAnimation > finished = null,
bool oneShot = false,
string name = null )

creates a new animation using these parameters

Parameters
targetthe animator to play the animation on
finishedexecuted when the animation is finished playing
oneShotwhether the animation is automatically destroyed when finished, when false the animation can be reused but has to be destroyed by the consumer
namename of the graph that is displayed in graph visualizers
Returns
the created animation that is ready to be played

◆ Create() [2/3]

PlayableAnimation AdventureCore.PlayableAnimationParameters.Create ( CharacterActionBase action,
Action< PlayableAnimation > finished = null,
bool oneShot = false,
string name = null )

creates a new animation using these parameters

Parameters
actionthe action starting the animation, animation is played on the actions character, its name appears in the graph name
finishedexecuted when the animation is finished playing
oneShotwhether the animation is automatically destroyed when finished, when false the animation can be reused but has to be destroyed by the consumer
namename of the graph that is displayed in graph visualizers
Returns
the created animation that is ready to be played

◆ Create() [3/3]

PlayableAnimation AdventureCore.PlayableAnimationParameters.Create ( CharacterBase character,
Action< PlayableAnimation > finished = null,
bool oneShot = false,
string name = null )

creates a new animation using these parameters

Parameters
characteranimation will be played on the charcters animator, its name appears in the graph name
finishedexecuted when the animation is finished playing
oneShotwhether the animation is automatically destroyed when finished, when false the animation can be reused but has to be destroyed by the consumer
namename of the graph that is displayed in graph visualizers
Returns
the created animation that is ready to be played

◆ Play() [1/3]

PlayableAnimation AdventureCore.PlayableAnimationParameters.Play ( Animator target,
CharacterBase character = null,
Action< PlayableAnimation > finished = null,
bool oneShot = true,
string name = null )

creates a new animation using these parameters and immediately plays it

Parameters
targetthe animator to play the animation on
finishedexecuted when the animation is finished playing
oneShotwhether the animation is automatically destroyed when finished, when false the animation can be reused but has to be destroyed by the consumer
namename of the graph that is displayed in graph visualizers
Returns
the created animation that has been started

◆ Play() [2/3]

PlayableAnimation AdventureCore.PlayableAnimationParameters.Play ( CharacterActionBase action,
Action< PlayableAnimation > finished = null,
bool oneShot = true,
string name = null )

creates a new animation using these parameters and immediately plays it

Parameters
actionthe action starting the animation, animation is played on the actions character, its name appears in the graph name
finishedexecuted when the animation is finished playing
oneShotwhether the animation is automatically destroyed when finished, when false the animation can be reused but has to be destroyed by the consumer
namename of the graph that is displayed in graph visualizers
Returns
the created animation that has been started

◆ Play() [3/3]

PlayableAnimation AdventureCore.PlayableAnimationParameters.Play ( CharacterBase character,
Action< PlayableAnimation > finished = null,
bool oneShot = true,
string name = null )

creates a new animation using these parameters and immediately plays it

Parameters
characteranimation will be played on the charcters animator, its name appears in the graph name
finishedexecuted when the animation is finished playing
oneShotwhether the animation is automatically destroyed when finished, when false the animation can be reused but has to be destroyed by the consumer
namename of the graph that is displayed in graph visualizers
Returns
the created animation that has been started