AnimationNodeStateMachinePlayback.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="3.2">
  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. [codeblock]
  10. var state_machine = $AnimationTree.get("parameters/playback")
  11. state_machine.travel("some_state")
  12. [/codeblock]
  13. </description>
  14. <tutorials>
  15. <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
  16. </tutorials>
  17. <methods>
  18. <method name="get_current_node" qualifiers="const">
  19. <return type="String">
  20. </return>
  21. <description>
  22. Returns the currently playing animation state.
  23. </description>
  24. </method>
  25. <method name="get_travel_path" qualifiers="const">
  26. <return type="PoolStringArray">
  27. </return>
  28. <description>
  29. Returns the current travel path as computed internally by the A* algorithm.
  30. </description>
  31. </method>
  32. <method name="is_playing" qualifiers="const">
  33. <return type="bool">
  34. </return>
  35. <description>
  36. Returns [code]true[/code] if an animation is playing.
  37. </description>
  38. </method>
  39. <method name="start">
  40. <return type="void">
  41. </return>
  42. <argument index="0" name="node" type="String">
  43. </argument>
  44. <description>
  45. Starts playing the given animation.
  46. </description>
  47. </method>
  48. <method name="stop">
  49. <return type="void">
  50. </return>
  51. <description>
  52. Stops the currently playing animation.
  53. </description>
  54. </method>
  55. <method name="travel">
  56. <return type="void">
  57. </return>
  58. <argument index="0" name="to_node" type="String">
  59. </argument>
  60. <description>
  61. Transitions from the current state to another one, following the shortest path.
  62. </description>
  63. </method>
  64. </methods>
  65. <members>
  66. <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
  67. </members>
  68. <constants>
  69. </constants>
  70. </class>