Search Results for

    Show / Hide Table of Contents

    Class TransitionAttribute

    Transition attribute to manage transitions between states for a state machine.

    Inheritance
    Object
    Attribute
    TransitionAttribute
    AnimationTransitionAttribute
    TransitionAfterTimeAttribute
    TransitionFromAttribute
    Implements
    ITransition<Type>
    Namespace: nickmaltbie.StateMachineUnity.Attributes
    Assembly: cs.temp.dll.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
    public class TransitionAttribute : Attribute, ITransition<Type>

    Constructors

    TransitionAttribute(Type, Type)

    Transition to another state on a given event.

    Declaration
    public TransitionAttribute(Type triggerEvent, Type targetState)
    Parameters
    Type Name Description
    Type triggerEvent

    Trigger event to cause transition.

    Type targetState

    New state to transition to upon trigger.

    Properties

    TargetState

    Target state upon event trigger.

    Declaration
    public Type TargetState { get; }
    Property Value
    Type Description
    Type

    TriggerEvent

    Type of event to listen for.

    Declaration
    public Type TriggerEvent { get; }
    Property Value
    Type Description
    Type

    Methods

    OnTransition(IStateMachine<Type>)

    Behaviour to invoke when this transition is triggered.

    Declaration
    public virtual void OnTransition(IStateMachine<Type> sm)
    Parameters
    Type Name Description
    IStateMachine<Type> sm

    State machine being transitioned.

    Implements

    ITransition<TState>
    In This Article
    Back to top State Machine Unity Documentation