Files
godot-docs/classes/class_animationnodetransition.rst
2022-11-17 21:03:53 +01:00

169 lines
7.9 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationNodeTransition.xml.
.. _class_AnimationNodeTransition:
AnimationNodeTransition
=======================
**Inherits:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
A generic animation transition node for :ref:`AnimationTree<class_AnimationTree>`.
Description
-----------
Simple state machine for cases which don't require a more advanced :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`. Animations can be connected to the inputs and transition times can be specified.
Tutorials
---------
- :doc:`AnimationTree <../tutorials/animation/animation_tree>`
- `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__
- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__
Properties
----------
+---------------------------+------------------------------------------------------------------------------+----------+
| :ref:`int<class_int>` | :ref:`enabled_inputs<class_AnimationNodeTransition_property_enabled_inputs>` | ``0`` |
+---------------------------+------------------------------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`from_start<class_AnimationNodeTransition_property_from_start>` | ``true`` |
+---------------------------+------------------------------------------------------------------------------+----------+
| :ref:`Curve<class_Curve>` | :ref:`xfade_curve<class_AnimationNodeTransition_property_xfade_curve>` | |
+---------------------------+------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`xfade_time<class_AnimationNodeTransition_property_xfade_time>` | ``0.0`` |
+---------------------------+------------------------------------------------------------------------------+----------+
Methods
-------
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_input_caption<class_AnimationNodeTransition_method_get_input_caption>` **(** :ref:`int<class_int>` input **)** |const| |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_input_set_as_auto_advance<class_AnimationNodeTransition_method_is_input_set_as_auto_advance>` **(** :ref:`int<class_int>` input **)** |const| |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_input_as_auto_advance<class_AnimationNodeTransition_method_set_input_as_auto_advance>` **(** :ref:`int<class_int>` input, :ref:`bool<class_bool>` enable **)** |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_input_caption<class_AnimationNodeTransition_method_set_input_caption>` **(** :ref:`int<class_int>` input, :ref:`String<class_String>` caption **)** |
+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Property Descriptions
---------------------
.. _class_AnimationNodeTransition_property_enabled_inputs:
- :ref:`int<class_int>` **enabled_inputs**
+-----------+---------------------------+
| *Default* | ``0`` |
+-----------+---------------------------+
| *Setter* | set_enabled_inputs(value) |
+-----------+---------------------------+
| *Getter* | get_enabled_inputs() |
+-----------+---------------------------+
The number of enabled input ports for this node.
----
.. _class_AnimationNodeTransition_property_from_start:
- :ref:`bool<class_bool>` **from_start**
+-----------+-----------------------+
| *Default* | ``true`` |
+-----------+-----------------------+
| *Setter* | set_from_start(value) |
+-----------+-----------------------+
| *Getter* | is_from_start() |
+-----------+-----------------------+
If ``true``, the destination animation is played back from the beginning when switched.
----
.. _class_AnimationNodeTransition_property_xfade_curve:
- :ref:`Curve<class_Curve>` **xfade_curve**
+----------+------------------------+
| *Setter* | set_xfade_curve(value) |
+----------+------------------------+
| *Getter* | get_xfade_curve() |
+----------+------------------------+
.. container:: contribute
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
----
.. _class_AnimationNodeTransition_property_xfade_time:
- :ref:`float<class_float>` **xfade_time**
+-----------+-----------------------+
| *Default* | ``0.0`` |
+-----------+-----------------------+
| *Setter* | set_xfade_time(value) |
+-----------+-----------------------+
| *Getter* | get_xfade_time() |
+-----------+-----------------------+
Cross-fading time (in seconds) between each animation connected to the inputs.
Method Descriptions
-------------------
.. _class_AnimationNodeTransition_method_get_input_caption:
- :ref:`String<class_String>` **get_input_caption** **(** :ref:`int<class_int>` input **)** |const|
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
----
.. _class_AnimationNodeTransition_method_is_input_set_as_auto_advance:
- :ref:`bool<class_bool>` **is_input_set_as_auto_advance** **(** :ref:`int<class_int>` input **)** |const|
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
----
.. _class_AnimationNodeTransition_method_set_input_as_auto_advance:
- void **set_input_as_auto_advance** **(** :ref:`int<class_int>` input, :ref:`bool<class_bool>` enable **)**
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
----
.. _class_AnimationNodeTransition_method_set_input_caption:
- void **set_input_caption** **(** :ref:`int<class_int>` input, :ref:`String<class_String>` caption **)**
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. |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.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`