class_animationnodeoneshot.rst 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationNodeOneShot.xml.
  6. .. _class_AnimationNodeOneShot:
  7. AnimationNodeOneShot
  8. ====================
  9. **Inherits:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Plays an animation once in :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
  11. Description
  12. -----------
  13. 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.
  14. Tutorials
  15. ---------
  16. - :doc:`AnimationTree <../tutorials/animation/animation_tree>`
  17. - `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__
  18. Properties
  19. ----------
  20. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`autorestart<class_AnimationNodeOneShot_property_autorestart>` | ``false`` |
  22. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  23. | :ref:`float<class_float>` | :ref:`autorestart_delay<class_AnimationNodeOneShot_property_autorestart_delay>` | ``1.0`` |
  24. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  25. | :ref:`float<class_float>` | :ref:`autorestart_random_delay<class_AnimationNodeOneShot_property_autorestart_random_delay>` | ``0.0`` |
  26. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  27. | :ref:`float<class_float>` | :ref:`fadein_time<class_AnimationNodeOneShot_property_fadein_time>` | ``0.0`` |
  28. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  29. | :ref:`float<class_float>` | :ref:`fadeout_time<class_AnimationNodeOneShot_property_fadeout_time>` | ``0.0`` |
  30. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  31. | :ref:`MixMode<enum_AnimationNodeOneShot_MixMode>` | :ref:`mix_mode<class_AnimationNodeOneShot_property_mix_mode>` | ``0`` |
  32. +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
  33. Enumerations
  34. ------------
  35. .. _enum_AnimationNodeOneShot_MixMode:
  36. .. _class_AnimationNodeOneShot_constant_MIX_MODE_BLEND:
  37. .. _class_AnimationNodeOneShot_constant_MIX_MODE_ADD:
  38. enum **MixMode**:
  39. - **MIX_MODE_BLEND** = **0**
  40. - **MIX_MODE_ADD** = **1**
  41. Property Descriptions
  42. ---------------------
  43. .. _class_AnimationNodeOneShot_property_autorestart:
  44. - :ref:`bool<class_bool>` **autorestart**
  45. +-----------+------------------------+
  46. | *Default* | ``false`` |
  47. +-----------+------------------------+
  48. | *Setter* | set_autorestart(value) |
  49. +-----------+------------------------+
  50. | *Getter* | has_autorestart() |
  51. +-----------+------------------------+
  52. If ``true``, the sub-animation will restart automatically after finishing.
  53. ----
  54. .. _class_AnimationNodeOneShot_property_autorestart_delay:
  55. - :ref:`float<class_float>` **autorestart_delay**
  56. +-----------+------------------------------+
  57. | *Default* | ``1.0`` |
  58. +-----------+------------------------------+
  59. | *Setter* | set_autorestart_delay(value) |
  60. +-----------+------------------------------+
  61. | *Getter* | get_autorestart_delay() |
  62. +-----------+------------------------------+
  63. The delay after which the automatic restart is triggered, in seconds.
  64. ----
  65. .. _class_AnimationNodeOneShot_property_autorestart_random_delay:
  66. - :ref:`float<class_float>` **autorestart_random_delay**
  67. +-----------+-------------------------------------+
  68. | *Default* | ``0.0`` |
  69. +-----------+-------------------------------------+
  70. | *Setter* | set_autorestart_random_delay(value) |
  71. +-----------+-------------------------------------+
  72. | *Getter* | get_autorestart_random_delay() |
  73. +-----------+-------------------------------------+
  74. 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>`.
  75. ----
  76. .. _class_AnimationNodeOneShot_property_fadein_time:
  77. - :ref:`float<class_float>` **fadein_time**
  78. +-----------+------------------------+
  79. | *Default* | ``0.0`` |
  80. +-----------+------------------------+
  81. | *Setter* | set_fadein_time(value) |
  82. +-----------+------------------------+
  83. | *Getter* | get_fadein_time() |
  84. +-----------+------------------------+
  85. ----
  86. .. _class_AnimationNodeOneShot_property_fadeout_time:
  87. - :ref:`float<class_float>` **fadeout_time**
  88. +-----------+-------------------------+
  89. | *Default* | ``0.0`` |
  90. +-----------+-------------------------+
  91. | *Setter* | set_fadeout_time(value) |
  92. +-----------+-------------------------+
  93. | *Getter* | get_fadeout_time() |
  94. +-----------+-------------------------+
  95. ----
  96. .. _class_AnimationNodeOneShot_property_mix_mode:
  97. - :ref:`MixMode<enum_AnimationNodeOneShot_MixMode>` **mix_mode**
  98. +-----------+---------------------+
  99. | *Default* | ``0`` |
  100. +-----------+---------------------+
  101. | *Setter* | set_mix_mode(value) |
  102. +-----------+---------------------+
  103. | *Getter* | get_mix_mode() |
  104. +-----------+---------------------+
  105. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  106. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  107. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  108. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  109. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  110. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`