wait(n: number, action?: ()=>void): TimerController

Run the callback after n seconds.
// 3 seconds until explosion! Runnn!
wait(3, () => {
    explode()
})

// wait() returns a PromiseLike that can be used with await
await wait(1)
kaplay logo

3001.0.0-alpha.18

Misc