mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
183 lines
7.5 KiB
ReStructuredText
183 lines
7.5 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/AnimationNodeStateMachinePlayback.xml.
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback:
|
|
|
|
AnimationNodeStateMachinePlayback
|
|
=================================
|
|
|
|
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
Playback control for :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
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")
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`../tutorials/animation/animation_tree`
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Properties
|
|
----------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------+-------------------------+---------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | resource_local_to_scene | ``true`` (overrides :ref:`Resource<class_Resource_property_resource_local_to_scene>`) |
|
|
+-------------------------+-------------------------+---------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Methods
|
|
-------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_current_length<class_AnimationNodeStateMachinePlayback_method_get_current_length>` **(** **)** |const| |
|
|
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`get_current_node<class_AnimationNodeStateMachinePlayback_method_get_current_node>` **(** **)** |const| |
|
|
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_current_play_position<class_AnimationNodeStateMachinePlayback_method_get_current_play_position>` **(** **)** |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 **)** |
|
|
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_get_current_length:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **get_current_length** **(** **)** |const|
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_get_current_node:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`String<class_String>` **get_current_node** **(** **)** |const|
|
|
|
|
Returns the currently playing animation state.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_get_current_play_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **get_current_play_position** **(** **)** |const|
|
|
|
|
Returns the playback position within the current animation state.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_get_travel_path:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`PoolStringArray<class_PoolStringArray>` **get_travel_path** **(** **)** |const|
|
|
|
|
Returns the current travel path as computed internally by the A\* algorithm.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_is_playing:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **is_playing** **(** **)** |const|
|
|
|
|
Returns ``true`` if an animation is playing.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_start:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
void **start** **(** :ref:`String<class_String>` node **)**
|
|
|
|
Starts playing the given animation.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_stop:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
void **stop** **(** **)**
|
|
|
|
Stops the currently playing animation.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeStateMachinePlayback_method_travel:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
void **travel** **(** :ref:`String<class_String>` to_node **)**
|
|
|
|
Transitions from the current state to another one, following the shortest path.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|