task module
Waiting inside an async handler: init and event handlers may await; update is synchronous.
ในหน้านี้
Waiting inside an async handler: init and event handlers may await; update is synchronous.
3 functions, 0 constants. Scripts reach it as task::.
Functions
Argument kinds are the script values a call passes: node is a node handle, any a table or value of any kind, fn a callback.
| function | acts on | what it does |
|---|---|---|
frames(count: int) |
— | Park an async handler for a number of fixed steps; counted on the tick, so a replay waits exactly as long. |
seconds(seconds: float) |
— | Park an async handler for a span of simulation time, in fixed steps; the wall clock never enters it. |
wait(token: int) |
— | Park an async handler until the engine wakes the token it was given. |