public class AnimationNodeStateMachineTransition : Resource

Inheritance Chain

Constructors

    public AnimationNodeStateMachineTransition()

Signals

    "advance_condition_changed" ()

Properties

    public string AdvanceCondition { get; set; }

Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the AnimationTree that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if AnimationTree.TreeRoot is an AnimationNodeStateMachine and AdvanceCondition is set to “idle”:

[codeblock]

$animation_tree[“parameters/conditions/idle”] = is_on_floor and linear_velocity.x == 0

[/codeblock]

    public bool AutoAdvance { get; set; }

Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END].

    public bool Disabled { get; set; }

Don’t use this transition during AnimationNodeStateMachinePlayback.Travel(string) or AutoAdvance.

    public int Priority { get; set; }

Lower priority transitions are preferred when travelling through the tree via AnimationNodeStateMachinePlayback.Travel(string) or AutoAdvance.

    public SwitchModeEnum SwitchMode { get; set; }

The transition type.

    public float XfadeTime { get; set; }

The time to cross-fade between this state and the next.

Methods

    [Obsolete("GetAdvanceCondition is deprecated. Use the AdvanceCondition property instead.")]
    public string GetAdvanceCondition()

Getter for AdvanceCondition

    [Obsolete("GetPriority is deprecated. Use the Priority property instead.")]
    public int GetPriority()

Getter for Priority

    [Obsolete("GetSwitchMode is deprecated. Use the SwitchMode property instead.")]
    public SwitchModeEnum GetSwitchMode()

Getter for SwitchMode

    [Obsolete("GetXfadeTime is deprecated. Use the XfadeTime property instead.")]
    public float GetXfadeTime()

Getter for XfadeTime

    [Obsolete("HasAutoAdvance is deprecated. Use the AutoAdvance property instead.")]
    public bool HasAutoAdvance()

Getter for AutoAdvance

    [Obsolete("IsDisabled is deprecated. Use the Disabled property instead.")]
    public bool IsDisabled()

Getter for Disabled

    [Obsolete("SetAdvanceCondition is deprecated. Use the AdvanceCondition property instead.")]
    public void SetAdvanceCondition(string name)

Setter for AdvanceCondition

    [Obsolete("SetAutoAdvance is deprecated. Use the AutoAdvance property instead.")]
    public void SetAutoAdvance(bool autoAdvance)

Setter for AutoAdvance

    [Obsolete("SetDisabled is deprecated. Use the Disabled property instead.")]
    public void SetDisabled(bool disabled)

Setter for Disabled

    [Obsolete("SetPriority is deprecated. Use the Priority property instead.")]
    public void SetPriority(int priority)

Setter for Priority

    [Obsolete("SetSwitchMode is deprecated. Use the SwitchMode property instead.")]
    public void SetSwitchMode(SwitchModeEnum mode)

Setter for SwitchMode

    [Obsolete("SetXfadeTime is deprecated. Use the XfadeTime property instead.")]
    public void SetXfadeTime(float secs)

Setter for XfadeTime

Inner Types

SwitchModeEnum

Name Value Description
Immediate 0 Switch to the next state immediately. The current state will end and blend into the beginning of the new one.
Sync 1 Switch to the next state immediately, but will seek the new state to the playback position of the old state.
AtEnd 2 Wait for the current state playback to end, then switch to the beginning of the next state animation.
Tags: