Search Results for

    Show / Hide Table of Contents

    Class DynamicAnimationAttribute

    Dynamic animation attribute to control animations for a state machine via a function instead of a simple value.

    Inheritance
    Object
    Attribute
    AnimationAttribute
    DynamicAnimationAttribute
    Inherited Members
    AnimationAttribute.StateName
    AnimationAttribute.DefaultTransitionTime
    AnimationAttribute.FixedTimeTransition
    AnimationAttribute.AnimationLockTime
    AnimationAttribute.GetStateAnimation(Type, Object)
    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
    AnimationAttribute.AnimationHash

    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

    In This Article
    Back to top State Machine Unity Documentation