class_animationnodestatemachinetransition.rst 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/AnimationNodeStateMachineTransition.xml.
  6. .. _class_AnimationNodeStateMachineTransition:
  7. AnimationNodeStateMachineTransition
  8. ===================================
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. .. container:: contribute
  11. There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  12. .. rst-class:: classref-introduction-group
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/animation/animation_tree`
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+
  22. | :ref:`String<class_String>` | :ref:`advance_condition<class_AnimationNodeStateMachineTransition_property_advance_condition>` | ``""`` |
  23. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+
  24. | :ref:`bool<class_bool>` | :ref:`auto_advance<class_AnimationNodeStateMachineTransition_property_auto_advance>` | ``false`` |
  25. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+
  26. | :ref:`bool<class_bool>` | :ref:`disabled<class_AnimationNodeStateMachineTransition_property_disabled>` | ``false`` |
  27. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+
  28. | :ref:`int<class_int>` | :ref:`priority<class_AnimationNodeStateMachineTransition_property_priority>` | ``1`` |
  29. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+
  30. | :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` | :ref:`switch_mode<class_AnimationNodeStateMachineTransition_property_switch_mode>` | ``0`` |
  31. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+
  32. | :ref:`float<class_float>` | :ref:`xfade_time<class_AnimationNodeStateMachineTransition_property_xfade_time>` | ``0.0`` |
  33. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+
  34. .. rst-class:: classref-section-separator
  35. ----
  36. .. rst-class:: classref-descriptions-group
  37. Signals
  38. -------
  39. .. _class_AnimationNodeStateMachineTransition_signal_advance_condition_changed:
  40. .. rst-class:: classref-signal
  41. **advance_condition_changed** **(** **)**
  42. Emitted when :ref:`advance_condition<class_AnimationNodeStateMachineTransition_property_advance_condition>` is changed.
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Enumerations
  47. ------------
  48. .. _enum_AnimationNodeStateMachineTransition_SwitchMode:
  49. .. rst-class:: classref-enumeration
  50. enum **SwitchMode**:
  51. .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_IMMEDIATE:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` **SWITCH_MODE_IMMEDIATE** = ``0``
  54. Switch to the next state immediately. The current state will end and blend into the beginning of the new one.
  55. .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_SYNC:
  56. .. rst-class:: classref-enumeration-constant
  57. :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` **SWITCH_MODE_SYNC** = ``1``
  58. Switch to the next state immediately, but will seek the new state to the playback position of the old state.
  59. .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_AT_END:
  60. .. rst-class:: classref-enumeration-constant
  61. :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` **SWITCH_MODE_AT_END** = ``2``
  62. Wait for the current state playback to end, then switch to the beginning of the next state animation.
  63. .. rst-class:: classref-section-separator
  64. ----
  65. .. rst-class:: classref-descriptions-group
  66. Property Descriptions
  67. ---------------------
  68. .. _class_AnimationNodeStateMachineTransition_property_advance_condition:
  69. .. rst-class:: classref-property
  70. :ref:`String<class_String>` **advance_condition** = ``""``
  71. .. rst-class:: classref-property-setget
  72. - void **set_advance_condition** **(** :ref:`String<class_String>` value **)**
  73. - :ref:`String<class_String>` **get_advance_condition** **(** **)**
  74. 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 `Using AnimationTree <../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"``:
  75. ::
  76. $animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0)
  77. .. rst-class:: classref-item-separator
  78. ----
  79. .. _class_AnimationNodeStateMachineTransition_property_auto_advance:
  80. .. rst-class:: classref-property
  81. :ref:`bool<class_bool>` **auto_advance** = ``false``
  82. .. rst-class:: classref-property-setget
  83. - void **set_auto_advance** **(** :ref:`bool<class_bool>` value **)**
  84. - :ref:`bool<class_bool>` **has_auto_advance** **(** **)**
  85. 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>`.
  86. .. rst-class:: classref-item-separator
  87. ----
  88. .. _class_AnimationNodeStateMachineTransition_property_disabled:
  89. .. rst-class:: classref-property
  90. :ref:`bool<class_bool>` **disabled** = ``false``
  91. .. rst-class:: classref-property-setget
  92. - void **set_disabled** **(** :ref:`bool<class_bool>` value **)**
  93. - :ref:`bool<class_bool>` **is_disabled** **(** **)**
  94. Don't use this transition during :ref:`AnimationNodeStateMachinePlayback.travel<class_AnimationNodeStateMachinePlayback_method_travel>` or :ref:`auto_advance<class_AnimationNodeStateMachineTransition_property_auto_advance>`.
  95. .. rst-class:: classref-item-separator
  96. ----
  97. .. _class_AnimationNodeStateMachineTransition_property_priority:
  98. .. rst-class:: classref-property
  99. :ref:`int<class_int>` **priority** = ``1``
  100. .. rst-class:: classref-property-setget
  101. - void **set_priority** **(** :ref:`int<class_int>` value **)**
  102. - :ref:`int<class_int>` **get_priority** **(** **)**
  103. 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>`.
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _class_AnimationNodeStateMachineTransition_property_switch_mode:
  107. .. rst-class:: classref-property
  108. :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` **switch_mode** = ``0``
  109. .. rst-class:: classref-property-setget
  110. - void **set_switch_mode** **(** :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` value **)**
  111. - :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` **get_switch_mode** **(** **)**
  112. The transition type.
  113. .. rst-class:: classref-item-separator
  114. ----
  115. .. _class_AnimationNodeStateMachineTransition_property_xfade_time:
  116. .. rst-class:: classref-property
  117. :ref:`float<class_float>` **xfade_time** = ``0.0``
  118. .. rst-class:: classref-property-setget
  119. - void **set_xfade_time** **(** :ref:`float<class_float>` value **)**
  120. - :ref:`float<class_float>` **get_xfade_time** **(** **)**
  121. The time to cross-fade between this state and the next.
  122. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  123. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  124. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  125. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`