class_animationnodeoneshot.rst 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the AnimationNodeOneShot.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AnimationNodeOneShot:
  6. AnimationNodeOneShot
  7. ====================
  8. **Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Plays an animation once in :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
  10. Description
  11. -----------
  12. A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters.
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/animation/animation_tree`
  16. - `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`_
  17. Properties
  18. ----------
  19. +---------------------------+-----------------------------------------------------------------------------------------------+-----------+
  20. | :ref:`bool<class_bool>` | :ref:`autorestart<class_AnimationNodeOneShot_property_autorestart>` | ``false`` |
  21. +---------------------------+-----------------------------------------------------------------------------------------------+-----------+
  22. | :ref:`float<class_float>` | :ref:`autorestart_delay<class_AnimationNodeOneShot_property_autorestart_delay>` | ``1.0`` |
  23. +---------------------------+-----------------------------------------------------------------------------------------------+-----------+
  24. | :ref:`float<class_float>` | :ref:`autorestart_random_delay<class_AnimationNodeOneShot_property_autorestart_random_delay>` | ``0.0`` |
  25. +---------------------------+-----------------------------------------------------------------------------------------------+-----------+
  26. | :ref:`float<class_float>` | :ref:`fadein_time<class_AnimationNodeOneShot_property_fadein_time>` | ``0.1`` |
  27. +---------------------------+-----------------------------------------------------------------------------------------------+-----------+
  28. | :ref:`float<class_float>` | :ref:`fadeout_time<class_AnimationNodeOneShot_property_fadeout_time>` | ``0.1`` |
  29. +---------------------------+-----------------------------------------------------------------------------------------------+-----------+
  30. | :ref:`bool<class_bool>` | :ref:`sync<class_AnimationNodeOneShot_property_sync>` | ``false`` |
  31. +---------------------------+-----------------------------------------------------------------------------------------------+-----------+
  32. Methods
  33. -------
  34. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`MixMode<enum_AnimationNodeOneShot_MixMode>` | :ref:`get_mix_mode<class_AnimationNodeOneShot_method_get_mix_mode>` **(** **)** |const| |
  36. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_mix_mode<class_AnimationNodeOneShot_method_set_mix_mode>` **(** :ref:`MixMode<enum_AnimationNodeOneShot_MixMode>` mode **)** |
  38. +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  39. Enumerations
  40. ------------
  41. .. _enum_AnimationNodeOneShot_MixMode:
  42. .. _class_AnimationNodeOneShot_constant_MIX_MODE_BLEND:
  43. .. _class_AnimationNodeOneShot_constant_MIX_MODE_ADD:
  44. enum **MixMode**:
  45. - **MIX_MODE_BLEND** = **0**
  46. - **MIX_MODE_ADD** = **1**
  47. Property Descriptions
  48. ---------------------
  49. .. _class_AnimationNodeOneShot_property_autorestart:
  50. - :ref:`bool<class_bool>` **autorestart**
  51. +-----------+------------------------+
  52. | *Default* | ``false`` |
  53. +-----------+------------------------+
  54. | *Setter* | set_autorestart(value) |
  55. +-----------+------------------------+
  56. | *Getter* | has_autorestart() |
  57. +-----------+------------------------+
  58. If ``true``, the sub-animation will restart automatically after finishing.
  59. ----
  60. .. _class_AnimationNodeOneShot_property_autorestart_delay:
  61. - :ref:`float<class_float>` **autorestart_delay**
  62. +-----------+------------------------------+
  63. | *Default* | ``1.0`` |
  64. +-----------+------------------------------+
  65. | *Setter* | set_autorestart_delay(value) |
  66. +-----------+------------------------------+
  67. | *Getter* | get_autorestart_delay() |
  68. +-----------+------------------------------+
  69. The delay after which the automatic restart is triggered, in seconds.
  70. ----
  71. .. _class_AnimationNodeOneShot_property_autorestart_random_delay:
  72. - :ref:`float<class_float>` **autorestart_random_delay**
  73. +-----------+-------------------------------------+
  74. | *Default* | ``0.0`` |
  75. +-----------+-------------------------------------+
  76. | *Setter* | set_autorestart_random_delay(value) |
  77. +-----------+-------------------------------------+
  78. | *Getter* | get_autorestart_random_delay() |
  79. +-----------+-------------------------------------+
  80. If :ref:`autorestart<class_AnimationNodeOneShot_property_autorestart>` is ``true``, a random additional delay (in seconds) between 0 and this value will be added to :ref:`autorestart_delay<class_AnimationNodeOneShot_property_autorestart_delay>`.
  81. ----
  82. .. _class_AnimationNodeOneShot_property_fadein_time:
  83. - :ref:`float<class_float>` **fadein_time**
  84. +-----------+------------------------+
  85. | *Default* | ``0.1`` |
  86. +-----------+------------------------+
  87. | *Setter* | set_fadein_time(value) |
  88. +-----------+------------------------+
  89. | *Getter* | get_fadein_time() |
  90. +-----------+------------------------+
  91. ----
  92. .. _class_AnimationNodeOneShot_property_fadeout_time:
  93. - :ref:`float<class_float>` **fadeout_time**
  94. +-----------+-------------------------+
  95. | *Default* | ``0.1`` |
  96. +-----------+-------------------------+
  97. | *Setter* | set_fadeout_time(value) |
  98. +-----------+-------------------------+
  99. | *Getter* | get_fadeout_time() |
  100. +-----------+-------------------------+
  101. ----
  102. .. _class_AnimationNodeOneShot_property_sync:
  103. - :ref:`bool<class_bool>` **sync**
  104. +-----------+---------------------+
  105. | *Default* | ``false`` |
  106. +-----------+---------------------+
  107. | *Setter* | set_use_sync(value) |
  108. +-----------+---------------------+
  109. | *Getter* | is_using_sync() |
  110. +-----------+---------------------+
  111. Method Descriptions
  112. -------------------
  113. .. _class_AnimationNodeOneShot_method_get_mix_mode:
  114. - :ref:`MixMode<enum_AnimationNodeOneShot_MixMode>` **get_mix_mode** **(** **)** |const|
  115. ----
  116. .. _class_AnimationNodeOneShot_method_set_mix_mode:
  117. - void **set_mix_mode** **(** :ref:`MixMode<enum_AnimationNodeOneShot_MixMode>` mode **)**
  118. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  119. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  120. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`