diff options
Diffstat (limited to 'doc/classes/AnimationNodeStateMachine.xml')
-rw-r--r-- | doc/classes/AnimationNodeStateMachine.xml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 9ea83d2c5e..e08e288c59 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -6,10 +6,16 @@ <description> Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically. [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state") - [/codeblock] + [/gdscript] + [csharp] + var stateMachine = GetNode<AnimationTree>("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback; + stateMachine.Travel("some_state"); + [/csharp] + [/codeblocks] </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> |