diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index d810585cec3..e40973fd79d 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -1,12 +1,13 @@ + State machine for control of animations. - 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. + Contains multiple nodes representing animation states, connected in a graph. Nodes transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the [code]AnimationTree[/code] node to control it programatically. Example: [codeblock] - var state_machine = anim_tree["parameters/StateMachine/playback"] - state_machine.travel("SomeState") + var state_machine = $AnimationTree.get("parameters/playback") + state_machine.travel("some_state") [/codeblock] @@ -22,6 +23,7 @@ + Adds a new node to the graph. The [code]position[/code] is used for display in the editor. @@ -34,18 +36,21 @@ + Adds a transition between the given nodes. + Returns the graph's end node. + Returns the draw offset of the graph. Used for display in the editor. @@ -54,6 +59,7 @@ + Returns the animation node with the given name. @@ -62,6 +68,7 @@ + Returns the given animation node's name. @@ -70,12 +77,14 @@ + Returns the given node's coordinates. Used for display in the editor. + Returns the graph's end node. @@ -84,12 +93,14 @@ + Returns the given transition. + Returns the number of connections in the graph. @@ -98,6 +109,7 @@ + Returns the given transition's start node. @@ -106,6 +118,7 @@ + Returns the given transition's end node. @@ -114,6 +127,7 @@ + Returns [code]true[/code] if the graph contains the given node. @@ -124,6 +138,7 @@ + Returns [code]true[/code] if there is a transition between the given nodes. @@ -132,6 +147,7 @@ + Deletes the given node from the graph. @@ -142,6 +158,7 @@ + Deletes the given transition. @@ -150,6 +167,7 @@ + Deletes the given transition. @@ -160,6 +178,7 @@ + Renames the given node. @@ -168,6 +187,7 @@ + Sets the given node as the graph end point. @@ -176,6 +196,7 @@ + Sets the draw offset of the graph. Used for display in the editor. @@ -186,6 +207,7 @@ + Sets the node's coordinates. Used for display in the editor. @@ -194,6 +216,7 @@ + Sets the given node as the graph start point. diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index fe0cf234722..a266246f4a6 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -1,8 +1,14 @@ + Playback control for AnimationNodeStateMachine. + Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code]. Example: + [codeblock] + var state_machine = $AnimationTree.get("parameters/playback") + state_machine.travel("some_state") + [/codeblock] @@ -11,6 +17,7 @@ + Returns the currently playing animation state. @@ -23,6 +30,7 @@ + Returns [code]true[/code] if an animation is playing. @@ -31,12 +39,14 @@ + Starts playing the given animation. + Stops the currently playing animation. @@ -45,7 +55,7 @@ - Transition from the current state to another one, while visiting all the intermediate ones. This is done via the A* algorithm. + Transitions from the current state to another one, following the shortest path.