2
0

AnimationNodeStateMachinePlayback.xml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="4.0">
  3. <brief_description>
  4. Playback control for [AnimationNodeStateMachine].
  5. </brief_description>
  6. <description>
  7. Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code].
  8. [b]Example:[/b]
  9. [codeblocks]
  10. [gdscript]
  11. var state_machine = $AnimationTree.get("parameters/playback")
  12. state_machine.travel("some_state")
  13. [/gdscript]
  14. [csharp]
  15. var stateMachine = GetNode&lt;AnimationTree&gt;("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback;
  16. stateMachine.Travel("some_state");
  17. [/csharp]
  18. [/codeblocks]
  19. </description>
  20. <tutorials>
  21. <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
  22. </tutorials>
  23. <methods>
  24. <method name="get_current_length" qualifiers="const">
  25. <return type="float" />
  26. <description>
  27. </description>
  28. </method>
  29. <method name="get_current_node" qualifiers="const">
  30. <return type="StringName" />
  31. <description>
  32. Returns the currently playing animation state.
  33. </description>
  34. </method>
  35. <method name="get_current_play_position" qualifiers="const">
  36. <return type="float" />
  37. <description>
  38. Returns the playback position within the current animation state.
  39. </description>
  40. </method>
  41. <method name="get_travel_path" qualifiers="const">
  42. <return type="PackedStringArray" />
  43. <description>
  44. Returns the current travel path as computed internally by the A* algorithm.
  45. </description>
  46. </method>
  47. <method name="is_playing" qualifiers="const">
  48. <return type="bool" />
  49. <description>
  50. Returns [code]true[/code] if an animation is playing.
  51. </description>
  52. </method>
  53. <method name="start">
  54. <return type="void" />
  55. <argument index="0" name="node" type="StringName" />
  56. <description>
  57. Starts playing the given animation.
  58. </description>
  59. </method>
  60. <method name="stop">
  61. <return type="void" />
  62. <description>
  63. Stops the currently playing animation.
  64. </description>
  65. </method>
  66. <method name="travel">
  67. <return type="void" />
  68. <argument index="0" name="to_node" type="StringName" />
  69. <description>
  70. Transitions from the current state to another one, following the shortest path.
  71. </description>
  72. </method>
  73. </methods>
  74. <members>
  75. <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
  76. </members>
  77. </class>