gameplate - v2.3.0
    Preparing search index...

    Function createTimers

    • Create a Timers pool.

      Returns Timers

      const timers = createTimers();

      timers.after(2, () => spawnBoss()); // once, in 2s of game time
      const wave = timers.every(0.5, () => spawn()); // every 0.5s

      // In your loop (createGame does this for you):
      timers.advance(dt);

      wave.cancel(); // stop the repeating spawn