Class DynamicAnimationAttribute
Dynamic animation attribute to control animations for a state machine via a function instead of a simple value.
Inherited Members
Namespace: nickmaltbie.StateMachineUnity.Attributes
Assembly: cs.temp.dll.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class DynamicAnimationAttribute : AnimationAttribute
Constructors
DynamicAnimationAttribute(String, Single, Boolean, Single)
Initializes an instance of Dynamic animation attribute.
Declaration
public DynamicAnimationAttribute(string animationStateFn, float defaultTransitionTime = 0F, bool fixedTimeTransition = false, float animationLockTime = 0F)
Parameters
Type | Name | Description |
---|---|---|
String | animationStateFn | Animation state function for evaluating current animation state. |
Single | defaultTransitionTime | Default transition time when transitioning to this animation. |
Boolean | fixedTimeTransition | Is this transition in fixed time (true) or normalized time (false). |
Single | animationLockTime | Time to lock animation during transition. |
Properties
AnimationHash
Animation hash associated with the state this is attached to.
Declaration
public override int AnimationHash { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
AnimationStateFn
Evaluation function for the animation state.
Declaration
protected string AnimationStateFn { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
UpdateState(Object)
Update the state of this animation attribute based on the current instance configuration.
Declaration
public void UpdateState(object instance)
Parameters
Type | Name | Description |
---|---|---|
Object | instance | Instance to modify |