summaryrefslogtreecommitdiff
path: root/doc/classes/AnimationNodeStateMachine.xml
diff options
context:
space:
mode:
authorHaSa1002 <johawitt@outlook.de>2020-07-31 16:07:26 +0200
committerHaSa1002 <johawitt@outlook.de>2020-09-26 12:29:55 +0200
commitc5aded55dfb5162b62df839a48142d2755270901 (patch)
tree4dbad1a879a039db51efaf5a73cc15369193f45b /doc/classes/AnimationNodeStateMachine.xml
parentfea72f2a7102dc0eec083bf5397330cb7a05de94 (diff)
Add C# code examples to the docs
Only existing GDScript code examples are converted and added to the docs. This is the first batch include classes beginning with A and B. Included classes: * AcceptDialog * AESContext * Animation * AnimationNodeStateMachine * AnimationNodeStateMachinePlayback * AnimationNodeStateMachineTransition * Array * ArrayMesh * AStar * AStar2D * Bool * Button
Diffstat (limited to 'doc/classes/AnimationNodeStateMachine.xml')
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml10
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&lt;AnimationTree&gt;("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>