AnimationNodeStateMachinePlayback.xml 2.4 KB

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