public class AnimationNodeStateMachine : AnimationRootNode

Contains multiple root nodes as children in a graph. Each node is used as a state, and provides multiple functions to alternate between states. Retrieve the AnimationNodeStateMachinePlayback object from the AnimationTree node to control it programatically.

[codeblock]

var state_machine = anim_tree[“parameters/StateMachine/playback”]

state_machine.travel(“SomeState”)

[codeblock]

Inheritance Chain

Constructors

    public AnimationNodeStateMachine()

Methods

    public void AddNode(string name, AnimationNode node, Vector2? position = default(Vector2?))

    public void AddTransition(string from, string to, AnimationNodeStateMachineTransition transition)

    public string GetEndNode()

    public Vector2 GetGraphOffset()

    public AnimationNode GetNode(string name)

    public string GetNodeName(AnimationNode node)

    public Vector2 GetNodePosition(string name)

    public string GetStartNode()

    public AnimationNodeStateMachineTransition GetTransition(int idx)

    public int GetTransitionCount()

    public string GetTransitionFrom(int idx)

    public string GetTransitionTo(int idx)

    public bool HasNode(string name)

    public bool HasTransition(string from, string to)

    public void RemoveNode(string name)

    public void RemoveTransition(string from, string to)

    public void RemoveTransitionByIndex(int idx)

    public void RenameNode(string name, string newName)

    public void SetEndNode(string name)

    public void SetGraphOffset(Vector2 offset)

    public void SetNodePosition(string name, Vector2 position)

    public void SetStartNode(string name)
Tags: