Files
godot-docs/classes/class_animationnodestatemachinetransition.rst
2019-06-29 12:36:34 +02:00

141 lines
7.0 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the AnimationNodeStateMachineTransition.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_AnimationNodeStateMachineTransition:
AnimationNodeStateMachineTransition
===================================
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
**Category:** Core
Brief Description
-----------------
Properties
----------
+------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`advance_condition<class_AnimationNodeStateMachineTransition_property_advance_condition>` |
+------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`auto_advance<class_AnimationNodeStateMachineTransition_property_auto_advance>` |
+------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`disabled<class_AnimationNodeStateMachineTransition_property_disabled>` |
+------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`priority<class_AnimationNodeStateMachineTransition_property_priority>` |
+------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
| :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` | :ref:`switch_mode<class_AnimationNodeStateMachineTransition_property_switch_mode>` |
+------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`xfade_time<class_AnimationNodeStateMachineTransition_property_xfade_time>` |
+------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
Signals
-------
.. _class_AnimationNodeStateMachineTransition_signal_advance_condition_changed:
- **advance_condition_changed** **(** **)**
Enumerations
------------
.. _enum_AnimationNodeStateMachineTransition_SwitchMode:
.. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_IMMEDIATE:
.. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_SYNC:
.. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_AT_END:
enum **SwitchMode**:
- **SWITCH_MODE_IMMEDIATE** = **0** --- Switch to the next state immediately. The current state will end and blend into the beginning of the new one.
- **SWITCH_MODE_SYNC** = **1** --- Switch to the next state immediately, but will seek the new state to the playback position of the old state.
- **SWITCH_MODE_AT_END** = **2** --- Wait for the current state playback to end, then switch to the beginning of the next state animation.
Property Descriptions
---------------------
.. _class_AnimationNodeStateMachineTransition_property_advance_condition:
- :ref:`String<class_String>` **advance_condition**
+----------+------------------------------+
| *Setter* | set_advance_condition(value) |
+----------+------------------------------+
| *Getter* | get_advance_condition() |
+----------+------------------------------+
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the :ref:`AnimationTree<class_AnimationTree>` that can be controlled from code (see `https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code <https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code>`_). For example, if :ref:`AnimationTree.tree_root<class_AnimationTree_property_tree_root>` is an :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>` and :ref:`advance_condition<class_AnimationNodeStateMachineTransition_property_advance_condition>` is set to "idle":
::
$animation_tree["parameters/conditions/idle"] = is_on_floor and linear_velocity.x == 0
.. _class_AnimationNodeStateMachineTransition_property_auto_advance:
- :ref:`bool<class_bool>` **auto_advance**
+----------+-------------------------+
| *Setter* | set_auto_advance(value) |
+----------+-------------------------+
| *Getter* | has_auto_advance() |
+----------+-------------------------+
Turn on the transition automatically when this state is reached. This works best with :ref:`SWITCH_MODE_AT_END<class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_AT_END>`.
.. _class_AnimationNodeStateMachineTransition_property_disabled:
- :ref:`bool<class_bool>` **disabled**
+----------+---------------------+
| *Setter* | set_disabled(value) |
+----------+---------------------+
| *Getter* | is_disabled() |
+----------+---------------------+
Don't use this transition during :ref:`AnimationNodeStateMachinePlayback.travel<class_AnimationNodeStateMachinePlayback_method_travel>` or :ref:`auto_advance<class_AnimationNodeStateMachineTransition_property_auto_advance>`.
.. _class_AnimationNodeStateMachineTransition_property_priority:
- :ref:`int<class_int>` **priority**
+----------+---------------------+
| *Setter* | set_priority(value) |
+----------+---------------------+
| *Getter* | get_priority() |
+----------+---------------------+
Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel<class_AnimationNodeStateMachinePlayback_method_travel>` or :ref:`auto_advance<class_AnimationNodeStateMachineTransition_property_auto_advance>`.
.. _class_AnimationNodeStateMachineTransition_property_switch_mode:
- :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` **switch_mode**
+----------+------------------------+
| *Setter* | set_switch_mode(value) |
+----------+------------------------+
| *Getter* | get_switch_mode() |
+----------+------------------------+
The transition type.
.. _class_AnimationNodeStateMachineTransition_property_xfade_time:
- :ref:`float<class_float>` **xfade_time**
+----------+-----------------------+
| *Setter* | set_xfade_time(value) |
+----------+-----------------------+
| *Getter* | get_xfade_time() |
+----------+-----------------------+
The time to cross-fade between this state and the next.