Difference between revisions of "Core.yield"

From GiderosMobile
m
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
=== Description ===
 
=== Description ===
 
Yield function running as background task.
 
Yield function running as background task.
 +
<syntaxhighlight lang="lua">
 +
Core.yield(state)
 +
</syntaxhighlight>
  
Core.yield([number of seconds to wait])<br/>
+
Core.yield([number of seconds to wait])
Core.yield(true) -- yield for a single frame and disable auto yield<br/>
 
Core.yield(false) -- don't yield now, but reenable autoyield<br/>
 
  
<source lang="lua">
+
Core.yield(true) -- yield for a single frame and disable auto yield
Core.yield(state)
+
 
</source>
+
Core.yield(false) -- don't yield now, but reenable autoyield
  
 
=== Parameters ===
 
=== Parameters ===
 
'''state''': (number or boolean) number of seconds to yield or boolean to enable/disable auto yield<br/>
 
'''state''': (number or boolean) number of seconds to yield or boolean to enable/disable auto yield<br/>
 
  
 
{{Core}}
 
{{Core}}

Latest revision as of 15:27, 13 July 2023

Available since: Gideros 2016.06
Class: Core

Description

Yield function running as background task.

Core.yield(state)

Core.yield([number of seconds to wait])

Core.yield(true) -- yield for a single frame and disable auto yield

Core.yield(false) -- don't yield now, but reenable autoyield

Parameters

state: (number or boolean) number of seconds to yield or boolean to enable/disable auto yield