class_animationnodestatemachineplayback.rst 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Playback control for AnimationNodeStateMachine.
  13. Methods
  14. -------
  15. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`String<class_String>` | :ref:`get_current_node<class_AnimationNodeStateMachinePlayback_method_get_current_node>` **(** **)** const |
  17. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_travel_path<class_AnimationNodeStateMachinePlayback_method_get_travel_path>` **(** **)** const |
  19. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationNodeStateMachinePlayback_method_is_playing>` **(** **)** const |
  21. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`start<class_AnimationNodeStateMachinePlayback_method_start>` **(** :ref:`String<class_String>` node **)** |
  23. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`stop<class_AnimationNodeStateMachinePlayback_method_stop>` **(** **)** |
  25. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`travel<class_AnimationNodeStateMachinePlayback_method_travel>` **(** :ref:`String<class_String>` to_node **)** |
  27. +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
  28. Description
  29. -----------
  30. Allows control of :ref:`AnimationTree<class_AnimationTree>` state machines created with :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`. Retrieve with ``$AnimationTree.get("parameters/playback")``.
  31. **Example:**
  32. ::
  33. var state_machine = $AnimationTree.get("parameters/playback")
  34. state_machine.travel("some_state")
  35. Method Descriptions
  36. -------------------
  37. .. _class_AnimationNodeStateMachinePlayback_method_get_current_node:
  38. - :ref:`String<class_String>` **get_current_node** **(** **)** const
  39. Returns the currently playing animation state.
  40. .. _class_AnimationNodeStateMachinePlayback_method_get_travel_path:
  41. - :ref:`PoolStringArray<class_PoolStringArray>` **get_travel_path** **(** **)** const
  42. .. _class_AnimationNodeStateMachinePlayback_method_is_playing:
  43. - :ref:`bool<class_bool>` **is_playing** **(** **)** const
  44. Returns ``true`` if an animation is playing.
  45. .. _class_AnimationNodeStateMachinePlayback_method_start:
  46. - void **start** **(** :ref:`String<class_String>` node **)**
  47. Starts playing the given animation.
  48. .. _class_AnimationNodeStateMachinePlayback_method_stop:
  49. - void **stop** **(** **)**
  50. Stops the currently playing animation.
  51. .. _class_AnimationNodeStateMachinePlayback_method_travel:
  52. - void **travel** **(** :ref:`String<class_String>` to_node **)**
  53. Transitions from the current state to another one, following the shortest path.