:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the AnimationNodeOneShot.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_AnimationNodeOneShot: AnimationNodeOneShot ==================== **Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` Plays an animation once in :ref:`AnimationNodeBlendTree`. Description ----------- A resource to add to an :ref:`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. Tutorials --------- - :doc:`../tutorials/animation/animation_tree` Properties ---------- +---------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`autorestart` | ``false`` | +---------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`autorestart_delay` | ``1.0`` | +---------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | +---------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`fadein_time` | ``0.1`` | +---------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`fadeout_time` | ``0.1`` | +---------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`sync` | ``false`` | +---------------------------+-----------------------------------------------------------------------------------------------+-----------+ Methods ------- +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`MixMode` | :ref:`get_mix_mode` **(** **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_mix_mode` **(** :ref:`MixMode` mode **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ .. _enum_AnimationNodeOneShot_MixMode: .. _class_AnimationNodeOneShot_constant_MIX_MODE_BLEND: .. _class_AnimationNodeOneShot_constant_MIX_MODE_ADD: enum **MixMode**: - **MIX_MODE_BLEND** = **0** - **MIX_MODE_ADD** = **1** Property Descriptions --------------------- .. _class_AnimationNodeOneShot_property_autorestart: - :ref:`bool` **autorestart** +-----------+------------------------+ | *Default* | ``false`` | +-----------+------------------------+ | *Setter* | set_autorestart(value) | +-----------+------------------------+ | *Getter* | has_autorestart() | +-----------+------------------------+ If ``true``, the sub-animation will restart automatically after finishing. ---- .. _class_AnimationNodeOneShot_property_autorestart_delay: - :ref:`float` **autorestart_delay** +-----------+------------------------------+ | *Default* | ``1.0`` | +-----------+------------------------------+ | *Setter* | set_autorestart_delay(value) | +-----------+------------------------------+ | *Getter* | get_autorestart_delay() | +-----------+------------------------------+ The delay after which the automatic restart is triggered, in seconds. ---- .. _class_AnimationNodeOneShot_property_autorestart_random_delay: - :ref:`float` **autorestart_random_delay** +-----------+-------------------------------------+ | *Default* | ``0.0`` | +-----------+-------------------------------------+ | *Setter* | set_autorestart_random_delay(value) | +-----------+-------------------------------------+ | *Getter* | get_autorestart_random_delay() | +-----------+-------------------------------------+ If :ref:`autorestart` is ``true``, a random additional delay (in seconds) between 0 and this value will be added to :ref:`autorestart_delay`. ---- .. _class_AnimationNodeOneShot_property_fadein_time: - :ref:`float` **fadein_time** +-----------+------------------------+ | *Default* | ``0.1`` | +-----------+------------------------+ | *Setter* | set_fadein_time(value) | +-----------+------------------------+ | *Getter* | get_fadein_time() | +-----------+------------------------+ ---- .. _class_AnimationNodeOneShot_property_fadeout_time: - :ref:`float` **fadeout_time** +-----------+-------------------------+ | *Default* | ``0.1`` | +-----------+-------------------------+ | *Setter* | set_fadeout_time(value) | +-----------+-------------------------+ | *Getter* | get_fadeout_time() | +-----------+-------------------------+ ---- .. _class_AnimationNodeOneShot_property_sync: - :ref:`bool` **sync** +-----------+---------------------+ | *Default* | ``false`` | +-----------+---------------------+ | *Setter* | set_use_sync(value) | +-----------+---------------------+ | *Getter* | is_using_sync() | +-----------+---------------------+ Method Descriptions ------------------- .. _class_AnimationNodeOneShot_method_get_mix_mode: - :ref:`MixMode` **get_mix_mode** **(** **)** |const| ---- .. _class_AnimationNodeOneShot_method_set_mix_mode: - void **set_mix_mode** **(** :ref:`MixMode` mode **)** .. |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.)`