mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
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
This commit is contained in:
@@ -6,10 +6,16 @@
|
||||
<description>
|
||||
Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code].
|
||||
[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>
|
||||
|
||||
Reference in New Issue
Block a user