class_animationnodestatemachineplayback.rst 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.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 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. Properties
  18. ----------
  19. +-------------------------+-------------------------+-----------------+
  20. | :ref:`bool<class_bool>` | resource_local_to_scene | **O:** ``true`` |
  21. +-------------------------+-------------------------+-----------------+
  22. Methods
  23. -------
  24. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`String<class_String>` | :ref:`get_current_node<class_AnimationNodeStateMachinePlayback_method_get_current_node>` **(** **)** const |
  26. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_travel_path<class_AnimationNodeStateMachinePlayback_method_get_travel_path>` **(** **)** const |
  28. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationNodeStateMachinePlayback_method_is_playing>` **(** **)** const |
  30. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`start<class_AnimationNodeStateMachinePlayback_method_start>` **(** :ref:`String<class_String>` node **)** |
  32. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`stop<class_AnimationNodeStateMachinePlayback_method_stop>` **(** **)** |
  34. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`travel<class_AnimationNodeStateMachinePlayback_method_travel>` **(** :ref:`String<class_String>` to_node **)** |
  36. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  37. Method Descriptions
  38. -------------------
  39. .. _class_AnimationNodeStateMachinePlayback_method_get_current_node:
  40. - :ref:`String<class_String>` **get_current_node** **(** **)** const
  41. Returns the currently playing animation state.
  42. ----
  43. .. _class_AnimationNodeStateMachinePlayback_method_get_travel_path:
  44. - :ref:`PoolStringArray<class_PoolStringArray>` **get_travel_path** **(** **)** const
  45. ----
  46. .. _class_AnimationNodeStateMachinePlayback_method_is_playing:
  47. - :ref:`bool<class_bool>` **is_playing** **(** **)** const
  48. Returns ``true`` if an animation is playing.
  49. ----
  50. .. _class_AnimationNodeStateMachinePlayback_method_start:
  51. - void **start** **(** :ref:`String<class_String>` node **)**
  52. Starts playing the given animation.
  53. ----
  54. .. _class_AnimationNodeStateMachinePlayback_method_stop:
  55. - void **stop** **(** **)**
  56. Stops the currently playing animation.
  57. ----
  58. .. _class_AnimationNodeStateMachinePlayback_method_travel:
  59. - void **travel** **(** :ref:`String<class_String>` to_node **)**
  60. Transitions from the current state to another one, following the shortest path.