class_visualscriptyield.rst 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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/modules/visual_script/doc_classes/VisualScriptYield.xml.
  6. .. _class_VisualScriptYield:
  7. VisualScriptYield
  8. =================
  9. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A Visual Script node used to pause a function execution.
  11. Description
  12. -----------
  13. ``VisualScriptYield`` will pause the function call and return :ref:`VisualScriptFunctionState<class_VisualScriptFunctionState>`, which can be used to resume the function.
  14. Properties
  15. ----------
  16. +----------------------------------------------------+--------------------------------------------------------------+-------+
  17. | :ref:`YieldMode<enum_VisualScriptYield_YieldMode>` | :ref:`mode<class_VisualScriptYield_property_mode>` | ``1`` |
  18. +----------------------------------------------------+--------------------------------------------------------------+-------+
  19. | :ref:`float<class_float>` | :ref:`wait_time<class_VisualScriptYield_property_wait_time>` | |
  20. +----------------------------------------------------+--------------------------------------------------------------+-------+
  21. Enumerations
  22. ------------
  23. .. _enum_VisualScriptYield_YieldMode:
  24. .. _class_VisualScriptYield_constant_YIELD_FRAME:
  25. .. _class_VisualScriptYield_constant_YIELD_PHYSICS_FRAME:
  26. .. _class_VisualScriptYield_constant_YIELD_WAIT:
  27. enum **YieldMode**:
  28. - **YIELD_FRAME** = **1** --- Yields during an idle frame.
  29. - **YIELD_PHYSICS_FRAME** = **2** --- Yields during a physics frame.
  30. - **YIELD_WAIT** = **3** --- Yields a function and waits the given time.
  31. Property Descriptions
  32. ---------------------
  33. .. _class_VisualScriptYield_property_mode:
  34. - :ref:`YieldMode<enum_VisualScriptYield_YieldMode>` **mode**
  35. +-----------+-----------------------+
  36. | *Default* | ``1`` |
  37. +-----------+-----------------------+
  38. | *Setter* | set_yield_mode(value) |
  39. +-----------+-----------------------+
  40. | *Getter* | get_yield_mode() |
  41. +-----------+-----------------------+
  42. The mode to use for yielding. See :ref:`YieldMode<enum_VisualScriptYield_YieldMode>` for available options.
  43. ----
  44. .. _class_VisualScriptYield_property_wait_time:
  45. - :ref:`float<class_float>` **wait_time**
  46. +----------+----------------------+
  47. | *Setter* | set_wait_time(value) |
  48. +----------+----------------------+
  49. | *Getter* | get_wait_time() |
  50. +----------+----------------------+
  51. The time to wait when :ref:`mode<class_VisualScriptYield_property_mode>` is set to :ref:`YIELD_WAIT<class_VisualScriptYield_constant_YIELD_WAIT>`.
  52. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  53. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  54. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  55. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  56. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  57. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`