1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- :github_url: hide
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the AnimationNodeStateMachinePlayback.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_AnimationNodeStateMachinePlayback:
- AnimationNodeStateMachinePlayback
- =================================
- **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- Playback control for AnimationNodeStateMachine.
- Description
- -----------
- Allows control of :ref:`AnimationTree<class_AnimationTree>` state machines created with :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`. Retrieve with ``$AnimationTree.get("parameters/playback")``.
- **Example:**
- ::
- var state_machine = $AnimationTree.get("parameters/playback")
- state_machine.travel("some_state")
- Properties
- ----------
- +-------------------------+-------------------------+-----------------+
- | :ref:`bool<class_bool>` | resource_local_to_scene | **O:** ``true`` |
- +-------------------------+-------------------------+-----------------+
- Methods
- -------
- +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_String>` | :ref:`get_current_node<class_AnimationNodeStateMachinePlayback_method_get_current_node>` **(** **)** const |
- +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
- | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_travel_path<class_AnimationNodeStateMachinePlayback_method_get_travel_path>` **(** **)** const |
- +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationNodeStateMachinePlayback_method_is_playing>` **(** **)** const |
- +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`start<class_AnimationNodeStateMachinePlayback_method_start>` **(** :ref:`String<class_String>` node **)** |
- +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`stop<class_AnimationNodeStateMachinePlayback_method_stop>` **(** **)** |
- +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`travel<class_AnimationNodeStateMachinePlayback_method_travel>` **(** :ref:`String<class_String>` to_node **)** |
- +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
- Method Descriptions
- -------------------
- .. _class_AnimationNodeStateMachinePlayback_method_get_current_node:
- - :ref:`String<class_String>` **get_current_node** **(** **)** const
- Returns the currently playing animation state.
- ----
- .. _class_AnimationNodeStateMachinePlayback_method_get_travel_path:
- - :ref:`PoolStringArray<class_PoolStringArray>` **get_travel_path** **(** **)** const
- ----
- .. _class_AnimationNodeStateMachinePlayback_method_is_playing:
- - :ref:`bool<class_bool>` **is_playing** **(** **)** const
- Returns ``true`` if an animation is playing.
- ----
- .. _class_AnimationNodeStateMachinePlayback_method_start:
- - void **start** **(** :ref:`String<class_String>` node **)**
- Starts playing the given animation.
- ----
- .. _class_AnimationNodeStateMachinePlayback_method_stop:
- - void **stop** **(** **)**
- Stops the currently playing animation.
- ----
- .. _class_AnimationNodeStateMachinePlayback_method_travel:
- - void **travel** **(** :ref:`String<class_String>` to_node **)**
- Transitions from the current state to another one, following the shortest path.
|