1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- :github_url: hide
- .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the VisualScriptYield.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_VisualScriptYield:
- VisualScriptYield
- =================
- **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- A Visual Script node used to pause a function execution.
- Description
- -----------
- ``VisualScriptYield`` will pause the function call and return :ref:`VisualScriptFunctionState<class_VisualScriptFunctionState>`, which can be used to resume the function.
- Properties
- ----------
- +----------------------------------------------------+--------------------------------------------------------------+-------+
- | :ref:`YieldMode<enum_VisualScriptYield_YieldMode>` | :ref:`mode<class_VisualScriptYield_property_mode>` | ``1`` |
- +----------------------------------------------------+--------------------------------------------------------------+-------+
- | :ref:`float<class_float>` | :ref:`wait_time<class_VisualScriptYield_property_wait_time>` | |
- +----------------------------------------------------+--------------------------------------------------------------+-------+
- Enumerations
- ------------
- .. _enum_VisualScriptYield_YieldMode:
- .. _class_VisualScriptYield_constant_YIELD_FRAME:
- .. _class_VisualScriptYield_constant_YIELD_PHYSICS_FRAME:
- .. _class_VisualScriptYield_constant_YIELD_WAIT:
- enum **YieldMode**:
- - **YIELD_FRAME** = **1** --- Yields during an idle frame.
- - **YIELD_PHYSICS_FRAME** = **2** --- Yields during a physics frame.
- - **YIELD_WAIT** = **3** --- Yields a function and waits the given time.
- Property Descriptions
- ---------------------
- .. _class_VisualScriptYield_property_mode:
- - :ref:`YieldMode<enum_VisualScriptYield_YieldMode>` **mode**
- +-----------+-----------------------+
- | *Default* | ``1`` |
- +-----------+-----------------------+
- | *Setter* | set_yield_mode(value) |
- +-----------+-----------------------+
- | *Getter* | get_yield_mode() |
- +-----------+-----------------------+
- The mode to use for yielding. See :ref:`YieldMode<enum_VisualScriptYield_YieldMode>` for available options.
- ----
- .. _class_VisualScriptYield_property_wait_time:
- - :ref:`float<class_float>` **wait_time**
- +----------+----------------------+
- | *Setter* | set_wait_time(value) |
- +----------+----------------------+
- | *Getter* | get_wait_time() |
- +----------+----------------------+
- The time to wait when :ref:`mode<class_VisualScriptYield_property_mode>` is set to :ref:`YIELD_WAIT<class_VisualScriptYield_constant_YIELD_WAIT>`.
- .. |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.)`
|