class_animationnodestatemachinetransition.rst 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the AnimationNodeStateMachineTransition.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_AnimationNodeStateMachineTransition:
  5. AnimationNodeStateMachineTransition
  6. ===================================
  7. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Properties
  12. ----------
  13. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
  14. | :ref:`String<class_String>` | :ref:`advance_condition<class_AnimationNodeStateMachineTransition_property_advance_condition>` |
  15. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`auto_advance<class_AnimationNodeStateMachineTransition_property_auto_advance>` |
  17. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`disabled<class_AnimationNodeStateMachineTransition_property_disabled>` |
  19. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
  20. | :ref:`int<class_int>` | :ref:`priority<class_AnimationNodeStateMachineTransition_property_priority>` |
  21. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
  22. | :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` | :ref:`switch_mode<class_AnimationNodeStateMachineTransition_property_switch_mode>` |
  23. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
  24. | :ref:`float<class_float>` | :ref:`xfade_time<class_AnimationNodeStateMachineTransition_property_xfade_time>` |
  25. +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
  26. Signals
  27. -------
  28. .. _class_AnimationNodeStateMachineTransition_signal_advance_condition_changed:
  29. - **advance_condition_changed** **(** **)**
  30. Enumerations
  31. ------------
  32. .. _enum_AnimationNodeStateMachineTransition_SwitchMode:
  33. .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_IMMEDIATE:
  34. .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_SYNC:
  35. .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_AT_END:
  36. enum **SwitchMode**:
  37. - **SWITCH_MODE_IMMEDIATE** = **0** --- Switch to the next state immediately. The current state will end and blend into the beginning of the new one.
  38. - **SWITCH_MODE_SYNC** = **1** --- Switch to the next state immediately, but will seek the new state to the playback position of the old state.
  39. - **SWITCH_MODE_AT_END** = **2** --- Wait for the current state playback to end, then switch to the beginning of the next state animation.
  40. Property Descriptions
  41. ---------------------
  42. .. _class_AnimationNodeStateMachineTransition_property_advance_condition:
  43. - :ref:`String<class_String>` **advance_condition**
  44. +----------+------------------------------+
  45. | *Setter* | set_advance_condition(value) |
  46. +----------+------------------------------+
  47. | *Getter* | get_advance_condition() |
  48. +----------+------------------------------+
  49. 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":
  50. ::
  51. $animation_tree["parameters/conditions/idle"] = is_on_floor and linear_velocity.x == 0
  52. .. _class_AnimationNodeStateMachineTransition_property_auto_advance:
  53. - :ref:`bool<class_bool>` **auto_advance**
  54. +----------+-------------------------+
  55. | *Setter* | set_auto_advance(value) |
  56. +----------+-------------------------+
  57. | *Getter* | has_auto_advance() |
  58. +----------+-------------------------+
  59. 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>`.
  60. .. _class_AnimationNodeStateMachineTransition_property_disabled:
  61. - :ref:`bool<class_bool>` **disabled**
  62. +----------+---------------------+
  63. | *Setter* | set_disabled(value) |
  64. +----------+---------------------+
  65. | *Getter* | is_disabled() |
  66. +----------+---------------------+
  67. Don't use this transition during :ref:`AnimationNodeStateMachinePlayback.travel<class_AnimationNodeStateMachinePlayback_method_travel>` or :ref:`auto_advance<class_AnimationNodeStateMachineTransition_property_auto_advance>`.
  68. .. _class_AnimationNodeStateMachineTransition_property_priority:
  69. - :ref:`int<class_int>` **priority**
  70. +----------+---------------------+
  71. | *Setter* | set_priority(value) |
  72. +----------+---------------------+
  73. | *Getter* | get_priority() |
  74. +----------+---------------------+
  75. 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>`.
  76. .. _class_AnimationNodeStateMachineTransition_property_switch_mode:
  77. - :ref:`SwitchMode<enum_AnimationNodeStateMachineTransition_SwitchMode>` **switch_mode**
  78. +----------+------------------------+
  79. | *Setter* | set_switch_mode(value) |
  80. +----------+------------------------+
  81. | *Getter* | get_switch_mode() |
  82. +----------+------------------------+
  83. The transition type.
  84. .. _class_AnimationNodeStateMachineTransition_property_xfade_time:
  85. - :ref:`float<class_float>` **xfade_time**
  86. +----------+-----------------------+
  87. | *Setter* | set_xfade_time(value) |
  88. +----------+-----------------------+
  89. | *Getter* | get_xfade_time() |
  90. +----------+-----------------------+
  91. The time to cross-fade between this state and the next.