:github_url: hide .. Generated automatically by doc/tools/make_rst.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//doc_classes. .. _class_AnimationNodeStateMachineTransition: AnimationNodeStateMachineTransition =================================== **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Tutorials --------- - :doc:`AnimationTree <../tutorials/animation/animation_tree>` Properties ---------- +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`StringName` | :ref:`advance_condition` | ``&""`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`auto_advance` | ``false`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`disabled` | ``false`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`priority` | ``1`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`xfade_time` | ``0.0`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ Signals ------- .. _class_AnimationNodeStateMachineTransition_signal_advance_condition_changed: - **advance_condition_changed** **(** **)** Emitted when :ref:`advance_condition` is 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:`StringName` **advance_condition** +-----------+------------------------------+ | *Default* | ``&""`` | +-----------+------------------------------+ | *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` that can be controlled from code (see `#controlling-from-code <../tutorials/animation/animation_tree.html#controlling-from-code>`__ in :doc:`../tutorials/animation/animation_tree`). For example, if :ref:`AnimationTree.tree_root` is an :ref:`AnimationNodeStateMachine` and :ref:`advance_condition` is set to ``"idle"``: .. tabs:: .. code-tab:: gdscript $animation_tree.set("parameters/conditions/idle", is_on_floor and (linear_velocity.x == 0)) .. code-tab:: csharp GetNode("animation_tree").Set("parameters/conditions/idle", IsOnFloor && (LinearVelocity.x == 0)); ---- .. _class_AnimationNodeStateMachineTransition_property_auto_advance: - :ref:`bool` **auto_advance** +-----------+-------------------------+ | *Default* | ``false`` | +-----------+-------------------------+ | *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_property_disabled: - :ref:`bool` **disabled** +-----------+---------------------+ | *Default* | ``false`` | +-----------+---------------------+ | *Setter* | set_disabled(value) | +-----------+---------------------+ | *Getter* | is_disabled() | +-----------+---------------------+ Don't use this transition during :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`auto_advance`. ---- .. _class_AnimationNodeStateMachineTransition_property_priority: - :ref:`int` **priority** +-----------+---------------------+ | *Default* | ``1`` | +-----------+---------------------+ | *Setter* | set_priority(value) | +-----------+---------------------+ | *Getter* | get_priority() | +-----------+---------------------+ Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`auto_advance`. ---- .. _class_AnimationNodeStateMachineTransition_property_switch_mode: - :ref:`SwitchMode` **switch_mode** +-----------+------------------------+ | *Default* | ``0`` | +-----------+------------------------+ | *Setter* | set_switch_mode(value) | +-----------+------------------------+ | *Getter* | get_switch_mode() | +-----------+------------------------+ The transition type. ---- .. _class_AnimationNodeStateMachineTransition_property_xfade_time: - :ref:`float` **xfade_time** +-----------+-----------------------+ | *Default* | ``0.0`` | +-----------+-----------------------+ | *Setter* | set_xfade_time(value) | +-----------+-----------------------+ | *Getter* | get_xfade_time() | +-----------+-----------------------+ The time to cross-fade between this state and the next. .. |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.)`