class_animationnodestatemachineplayback.rst 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/AnimationNodeStateMachinePlayback.xml.
  6. .. _class_AnimationNodeStateMachinePlayback:
  7. AnimationNodeStateMachinePlayback
  8. =================================
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Playback control for :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Allows control of :ref:`AnimationTree<class_AnimationTree>` state machines created with :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`. Retrieve with ``$AnimationTree.get("parameters/playback")``.
  15. \ **Example:**\
  16. ::
  17. var state_machine = $AnimationTree.get("parameters/playback")
  18. state_machine.travel("some_state")
  19. .. rst-class:: classref-introduction-group
  20. Tutorials
  21. ---------
  22. - :doc:`../tutorials/animation/animation_tree`
  23. .. rst-class:: classref-reftable-group
  24. Properties
  25. ----------
  26. .. table::
  27. :widths: auto
  28. +-------------------------+-------------------------+---------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | resource_local_to_scene | ``true`` (overrides :ref:`Resource<class_Resource_property_resource_local_to_scene>`) |
  30. +-------------------------+-------------------------+---------------------------------------------------------------------------------------+
  31. .. rst-class:: classref-reftable-group
  32. Methods
  33. -------
  34. .. table::
  35. :widths: auto
  36. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`float<class_float>` | :ref:`get_current_length<class_AnimationNodeStateMachinePlayback_method_get_current_length>` **(** **)** |const| |
  38. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`String<class_String>` | :ref:`get_current_node<class_AnimationNodeStateMachinePlayback_method_get_current_node>` **(** **)** |const| |
  40. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`float<class_float>` | :ref:`get_current_play_position<class_AnimationNodeStateMachinePlayback_method_get_current_play_position>` **(** **)** |const| |
  42. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_travel_path<class_AnimationNodeStateMachinePlayback_method_get_travel_path>` **(** **)** |const| |
  44. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationNodeStateMachinePlayback_method_is_playing>` **(** **)** |const| |
  46. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`start<class_AnimationNodeStateMachinePlayback_method_start>` **(** :ref:`String<class_String>` node **)** |
  48. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`stop<class_AnimationNodeStateMachinePlayback_method_stop>` **(** **)** |
  50. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`travel<class_AnimationNodeStateMachinePlayback_method_travel>` **(** :ref:`String<class_String>` to_node **)** |
  52. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  53. .. rst-class:: classref-section-separator
  54. ----
  55. .. rst-class:: classref-descriptions-group
  56. Method Descriptions
  57. -------------------
  58. .. _class_AnimationNodeStateMachinePlayback_method_get_current_length:
  59. .. rst-class:: classref-method
  60. :ref:`float<class_float>` **get_current_length** **(** **)** |const|
  61. .. container:: contribute
  62. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  63. .. rst-class:: classref-item-separator
  64. ----
  65. .. _class_AnimationNodeStateMachinePlayback_method_get_current_node:
  66. .. rst-class:: classref-method
  67. :ref:`String<class_String>` **get_current_node** **(** **)** |const|
  68. Returns the currently playing animation state.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _class_AnimationNodeStateMachinePlayback_method_get_current_play_position:
  72. .. rst-class:: classref-method
  73. :ref:`float<class_float>` **get_current_play_position** **(** **)** |const|
  74. Returns the playback position within the current animation state.
  75. .. rst-class:: classref-item-separator
  76. ----
  77. .. _class_AnimationNodeStateMachinePlayback_method_get_travel_path:
  78. .. rst-class:: classref-method
  79. :ref:`PoolStringArray<class_PoolStringArray>` **get_travel_path** **(** **)** |const|
  80. Returns the current travel path as computed internally by the A\* algorithm.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_AnimationNodeStateMachinePlayback_method_is_playing:
  84. .. rst-class:: classref-method
  85. :ref:`bool<class_bool>` **is_playing** **(** **)** |const|
  86. Returns ``true`` if an animation is playing.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_AnimationNodeStateMachinePlayback_method_start:
  90. .. rst-class:: classref-method
  91. void **start** **(** :ref:`String<class_String>` node **)**
  92. Starts playing the given animation.
  93. .. rst-class:: classref-item-separator
  94. ----
  95. .. _class_AnimationNodeStateMachinePlayback_method_stop:
  96. .. rst-class:: classref-method
  97. void **stop** **(** **)**
  98. Stops the currently playing animation.
  99. .. rst-class:: classref-item-separator
  100. ----
  101. .. _class_AnimationNodeStateMachinePlayback_method_travel:
  102. .. rst-class:: classref-method
  103. void **travel** **(** :ref:`String<class_String>` to_node **)**
  104. Transitions from the current state to another one, following the shortest path.
  105. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  106. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  107. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  108. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`