Coroutine¶
The Coroutine
library offers coroutines that support sleeping for X seconds or until a predicate is met.
CoroutineLib Class¶
Inherits from Library
.
Methods¶
Create¶
@param fun fun(inst:CoroutineInstance, ...)
CoroutineInstance Class¶
Events and Hooks¶
Finished (event)¶
Methods¶
Continue¶
IsDead¶
IsSleeping¶
Sleep¶
@param time number|function
@param ... any
Variables yielded. Discarded if the coroutine is resuming from sleeping, as there is no caller.