Delays are useful when you need to wait a certain amount of time between actions.

This method will delay the next action from executing for a certain amount of time (in milliseconds). This method is part of the actor 'Action' fluent API allowing action chaining.

const actor = new ex.Actor({...});

// move in a square at 200 pixels/second
// wait 1000 milliseconds between each section of the square
     .moveTo(ex.vec(100, 0), 200)
     .moveTo(ex.vec(100, 100), 200)
     .moveTo(ex.vec(0, 100), 200)
     .moveTo(ex.vec(0, 0), 200)