mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
106 lines
4.7 KiB
ReStructuredText
106 lines
4.7 KiB
ReStructuredText
: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 :ref:`AnimationNodeStateMachine<class_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")
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`../tutorials/animation/animation_tree`
|
|
|
|
Properties
|
|
----------
|
|
|
|
+-------------------------+-------------------------+-----------------+
|
|
| :ref:`bool<class_bool>` | resource_local_to_scene | **O:** ``true`` |
|
|
+-------------------------+-------------------------+-----------------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`StringName<class_StringName>` | :ref:`get_current_node<class_AnimationNodeStateMachinePlayback_method_get_current_node>` **(** **)** const |
|
|
+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedStringArray<class_PackedStringArray>` | :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:`StringName<class_StringName>` node **)** |
|
|
+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`stop<class_AnimationNodeStateMachinePlayback_method_stop>` **(** **)** |
|
|
+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`travel<class_AnimationNodeStateMachinePlayback_method_travel>` **(** :ref:`StringName<class_StringName>` to_node **)** |
|
|
+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_get_current_node:
|
|
|
|
- :ref:`StringName<class_StringName>` **get_current_node** **(** **)** const
|
|
|
|
Returns the currently playing animation state.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_get_travel_path:
|
|
|
|
- :ref:`PackedStringArray<class_PackedStringArray>` **get_travel_path** **(** **)** const
|
|
|
|
Returns the current travel path as computed internally by the A\* algorithm.
|
|
|
|
----
|
|
|
|
.. _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:`StringName<class_StringName>` node **)**
|
|
|
|
Starts playing the given animation.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_stop:
|
|
|
|
- void **stop** **(** **)**
|
|
|
|
Stops the currently playing animation.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_travel:
|
|
|
|
- void **travel** **(** :ref:`StringName<class_StringName>` to_node **)**
|
|
|
|
Transitions from the current state to another one, following the shortest path.
|
|
|