Search Results for

    Show / Hide Table of Contents

    Class TransitionAfterTimeAttribute

    Attribute to transition after a given period of time from one state to another.

    Supported by any implementation of the FixedSMBehaviour that has a sense of how much time has passed in the update or fixed update time.

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

    Constructors

    TransitionAfterTimeAttribute(Type, Single, Boolean)

    Transition to another state after a period of time.

    Declaration
    public TransitionAfterTimeAttribute(Type targetState, float timeToTransition, bool fixedUpdate = false)
    Parameters
    Type Name Description
    Type targetState

    New state to transition to upon trigger.

    Single timeToTransition

    Fixed time to transition to new state.

    Boolean fixedUpdate

    Should time from fixedDeltaTime or deltaTime be used. True corresponds to fixedDeltaTime, false corresponds to deltaTime

    Properties

    FixedUpdate

    Should fixed delta time be used to determine timeout.

    Declaration
    public bool FixedUpdate { get; }
    Property Value
    Type Description
    Boolean

    TimeToTransition

    Time in seconds to wait before transitioning.

    Declaration
    public float TimeToTransition { get; }
    Property Value
    Type Description
    Single

    Implements

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