Skip to content

makeSpawner

makeSpawner(nextIntervalMs, options?): Spawner

Defined in: src/modules/spawner/spawner.ts:44

Create a Spawner scheduled to first emit after nextIntervalMs(). The first interval is computed lazily on the first tickSpawner call (or an explicit resetSpawner), so nextIntervalMs is never invoked during construction and may close over game state created afterward.

() => number

SpawnerOptions = {}

Spawner