Constructors
constructor
- new Coroutine<T>(target, generator, onFinalize?): Coroutine<T>
Parameters
- target: object
- generator: (() => Generator<T, any, any>)
- (): Generator<T, any, any>
Returns Generator<T, any, any>
OptionalonFinalize: (() => void)
Accessors
isFinalized
- get isFinalized(): boolean
Returns boolean
Methods
abort
- abort(): void
Returns void
The Coroutine class implements an asynchronous function that can be repeatedly called to continue the execution where it last called
yield.Note
This is similar to
Component Coroutineswith the main difference being that the Coroutine must be manually updated each frame by a call to continue.