Class AnimationTransitionAttribute
Transition attribute to manage transitions between states for a state machine.
Inheritance
AnimationTransitionAttribute
Implements
Namespace: nickmaltbie.StateMachineUnity.Attributes
Assembly: cs.temp.dll.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public class AnimationTransitionAttribute : TransitionAttribute, ITransition<Type>
Constructors
AnimationTransitionAttribute(Type, Type, Single, Boolean, Single)
Transition to another state on a given event.
Declaration
public AnimationTransitionAttribute(Type triggerEvent, Type targetState, float transitionTime = 0F, bool fixedTimeTransition = false, float animationLockTime = 0F)
Parameters
Type | Name | Description |
---|---|---|
Type | triggerEvent | Trigger event to cause transition. |
Type | targetState | New state to transition to upon trigger. |
Single | transitionTime | Fixed time to transition to new state. |
Boolean | fixedTimeTransition | Is this transition in fixed time (true) or normalized time (false). |
Single | animationLockTime | Time to lock animation during transition. |
Properties
AnimationLockTime
Time to lock animation during transition.
Declaration
public float AnimationLockTime { get; }
Property Value
Type | Description |
---|---|
Single |
FixedTimeTransition
Is this transition in fixed time or normalized time.
Declaration
public bool FixedTimeTransition { get; }
Property Value
Type | Description |
---|---|
Boolean |
TransitionTime
Fixed time to transition to new state.
Declaration
public float TransitionTime { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
OnTransition(IStateMachine<Type>)
Behaviour to invoke when this transition is triggered.
Declaration
public override void OnTransition(IStateMachine<Type> sm)
Parameters
Type | Name | Description |
---|---|---|
IStateMachine<Type> | sm | State machine being transitioned. |