AnimationNodeStateMachinePlayback.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="3.3">
  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/3.3/tutorials/animation/animation_tree.html</link>
  16. </tutorials>
  17. <methods>
  18. <method name="get_current_length" qualifiers="const">
  19. <return type="float">
  20. </return>
  21. <description>
  22. </description>
  23. </method>
  24. <method name="get_current_node" qualifiers="const">
  25. <return type="String">
  26. </return>
  27. <description>
  28. Returns the currently playing animation state.
  29. </description>
  30. </method>
  31. <method name="get_current_play_position" qualifiers="const">
  32. <return type="float">
  33. </return>
  34. <description>
  35. Returns the playback position within the current animation state.
  36. </description>
  37. </method>
  38. <method name="get_travel_path" qualifiers="const">
  39. <return type="PoolStringArray">
  40. </return>
  41. <description>
  42. Returns the current travel path as computed internally by the A* algorithm.
  43. </description>
  44. </method>
  45. <method name="is_playing" qualifiers="const">
  46. <return type="bool">
  47. </return>
  48. <description>
  49. Returns [code]true[/code] if an animation is playing.
  50. </description>
  51. </method>
  52. <method name="start">
  53. <return type="void">
  54. </return>
  55. <argument index="0" name="node" type="String">
  56. </argument>
  57. <description>
  58. Starts playing the given animation.
  59. </description>
  60. </method>
  61. <method name="stop">
  62. <return type="void">
  63. </return>
  64. <description>
  65. Stops the currently playing animation.
  66. </description>
  67. </method>
  68. <method name="travel">
  69. <return type="void">
  70. </return>
  71. <argument index="0" name="to_node" type="String">
  72. </argument>
  73. <description>
  74. Transitions from the current state to another one, following the shortest path.
  75. </description>
  76. </method>
  77. </methods>
  78. <members>
  79. <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
  80. </members>
  81. <constants>
  82. </constants>
  83. </class>