class_animationnodestatemachineplayback.rst 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the AnimationNodeStateMachinePlayback.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AnimationNodeStateMachinePlayback:
  6. AnimationNodeStateMachinePlayback
  7. =================================
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Playback control for :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`.
  10. Description
  11. -----------
  12. Allows control of :ref:`AnimationTree<class_AnimationTree>` state machines created with :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`. Retrieve with ``$AnimationTree.get("parameters/playback")``.
  13. **Example:**
  14. ::
  15. var state_machine = $AnimationTree.get("parameters/playback")
  16. state_machine.travel("some_state")
  17. Tutorials
  18. ---------
  19. - :doc:`../tutorials/animation/animation_tree`
  20. Properties
  21. ----------
  22. +-------------------------+-------------------------+------------------------------+
  23. | :ref:`bool<class_bool>` | resource_local_to_scene | ``true`` *(parent override)* |
  24. +-------------------------+-------------------------+------------------------------+
  25. Methods
  26. -------
  27. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`float<class_float>` | :ref:`get_current_length<class_AnimationNodeStateMachinePlayback_method_get_current_length>` **(** **)** |const| |
  29. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`String<class_String>` | :ref:`get_current_node<class_AnimationNodeStateMachinePlayback_method_get_current_node>` **(** **)** |const| |
  31. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`float<class_float>` | :ref:`get_current_play_position<class_AnimationNodeStateMachinePlayback_method_get_current_play_position>` **(** **)** |const| |
  33. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_travel_path<class_AnimationNodeStateMachinePlayback_method_get_travel_path>` **(** **)** |const| |
  35. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationNodeStateMachinePlayback_method_is_playing>` **(** **)** |const| |
  37. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`start<class_AnimationNodeStateMachinePlayback_method_start>` **(** :ref:`String<class_String>` node **)** |
  39. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`stop<class_AnimationNodeStateMachinePlayback_method_stop>` **(** **)** |
  41. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`travel<class_AnimationNodeStateMachinePlayback_method_travel>` **(** :ref:`String<class_String>` to_node **)** |
  43. +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  44. Method Descriptions
  45. -------------------
  46. .. _class_AnimationNodeStateMachinePlayback_method_get_current_length:
  47. - :ref:`float<class_float>` **get_current_length** **(** **)** |const|
  48. ----
  49. .. _class_AnimationNodeStateMachinePlayback_method_get_current_node:
  50. - :ref:`String<class_String>` **get_current_node** **(** **)** |const|
  51. Returns the currently playing animation state.
  52. ----
  53. .. _class_AnimationNodeStateMachinePlayback_method_get_current_play_position:
  54. - :ref:`float<class_float>` **get_current_play_position** **(** **)** |const|
  55. Returns the playback position within the current animation state.
  56. ----
  57. .. _class_AnimationNodeStateMachinePlayback_method_get_travel_path:
  58. - :ref:`PoolStringArray<class_PoolStringArray>` **get_travel_path** **(** **)** |const|
  59. Returns the current travel path as computed internally by the A\* algorithm.
  60. ----
  61. .. _class_AnimationNodeStateMachinePlayback_method_is_playing:
  62. - :ref:`bool<class_bool>` **is_playing** **(** **)** |const|
  63. Returns ``true`` if an animation is playing.
  64. ----
  65. .. _class_AnimationNodeStateMachinePlayback_method_start:
  66. - void **start** **(** :ref:`String<class_String>` node **)**
  67. Starts playing the given animation.
  68. ----
  69. .. _class_AnimationNodeStateMachinePlayback_method_stop:
  70. - void **stop** **(** **)**
  71. Stops the currently playing animation.
  72. ----
  73. .. _class_AnimationNodeStateMachinePlayback_method_travel:
  74. - void **travel** **(** :ref:`String<class_String>` to_node **)**
  75. Transitions from the current state to another one, following the shortest path.
  76. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  77. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  78. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`