class_visualscriptyield.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualScriptYield.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualScriptYield:
  6. VisualScriptYield
  7. =================
  8. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. A Visual Script node used to pause a function execution.
  10. Description
  11. -----------
  12. ``VisualScriptYield`` will pause the function call and return :ref:`VisualScriptFunctionState<class_VisualScriptFunctionState>`, which can be used to resume the function.
  13. Properties
  14. ----------
  15. +----------------------------------------------------+--------------------------------------------------------------+-------+
  16. | :ref:`YieldMode<enum_VisualScriptYield_YieldMode>` | :ref:`mode<class_VisualScriptYield_property_mode>` | ``1`` |
  17. +----------------------------------------------------+--------------------------------------------------------------+-------+
  18. | :ref:`float<class_float>` | :ref:`wait_time<class_VisualScriptYield_property_wait_time>` | |
  19. +----------------------------------------------------+--------------------------------------------------------------+-------+
  20. Enumerations
  21. ------------
  22. .. _enum_VisualScriptYield_YieldMode:
  23. .. _class_VisualScriptYield_constant_YIELD_FRAME:
  24. .. _class_VisualScriptYield_constant_YIELD_PHYSICS_FRAME:
  25. .. _class_VisualScriptYield_constant_YIELD_WAIT:
  26. enum **YieldMode**:
  27. - **YIELD_FRAME** = **1** --- Yields during an idle frame.
  28. - **YIELD_PHYSICS_FRAME** = **2** --- Yields during a physics frame.
  29. - **YIELD_WAIT** = **3** --- Yields a function and waits the given time.
  30. Property Descriptions
  31. ---------------------
  32. .. _class_VisualScriptYield_property_mode:
  33. - :ref:`YieldMode<enum_VisualScriptYield_YieldMode>` **mode**
  34. +-----------+-----------------------+
  35. | *Default* | ``1`` |
  36. +-----------+-----------------------+
  37. | *Setter* | set_yield_mode(value) |
  38. +-----------+-----------------------+
  39. | *Getter* | get_yield_mode() |
  40. +-----------+-----------------------+
  41. The mode to use for yielding. See :ref:`YieldMode<enum_VisualScriptYield_YieldMode>` for available options.
  42. ----
  43. .. _class_VisualScriptYield_property_wait_time:
  44. - :ref:`float<class_float>` **wait_time**
  45. +----------+----------------------+
  46. | *Setter* | set_wait_time(value) |
  47. +----------+----------------------+
  48. | *Getter* | get_wait_time() |
  49. +----------+----------------------+
  50. The time to wait when :ref:`mode<class_VisualScriptYield_property_mode>` is set to :ref:`YIELD_WAIT<class_VisualScriptYield_constant_YIELD_WAIT>`.
  51. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  52. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  53. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`