Package com.csse3200.game.entities
Class EntitiesSpawner
java.lang.Object
com.csse3200.game.entities.EntitiesSpawner
Handles periodic spawning of multiple entities
-
Constructor Summary
ConstructorsConstructorDescriptionEntitiesSpawner(List<EntitySpawner> toSpawn) Constructor for EntitiesSpawner -
Method Summary
Modifier and TypeMethodDescriptionvoidsetGameAreas(GameArea gameArea) Set GameArea for all spawnersvoidspawnNow()Spawns entities from all spawners without considering triggersvoidStart periodic spawning for all spawners
-
Constructor Details
-
EntitiesSpawner
Constructor for EntitiesSpawner- Parameters:
toSpawn- list of NPCSpawnInfo objects that correspond to the entities to spawn
-
-
Method Details
-
setGameAreas
Set GameArea for all spawners- Parameters:
gameArea-
-
spawnNow
public void spawnNow()Spawns entities from all spawners without considering triggers -
startPeriodicSpawning
public void startPeriodicSpawning()Start periodic spawning for all spawners
-