Interface IEntitySpawner<T extends IEntity>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSpawnMode specifies the behaviour of the EntitySpawner: ALLSPAWNPOINTS: the specified spawnAmount is spawned at each of the SpawnPoints individually ONERANDOMSPAWNPOINT: the specified spawnAmount is spawned at one random SpawnPoint RANDOMSPAWNPOINTS: the specified spawnAmount is distributed equally to all of the SpawnPoints -
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of the provided Entity type.intGets the amount of Entities that are spawned in each wave.intGets the delay between spawning individual Entities of one wave.intGets the interval between spawn waves.Gets the spawn mode for an EntitySpawner.Gets the list of SpawnPoints that a EntitySpawner uses.voidsetSpawnAmount(int amount) Sets the amount of Entities that spawn in each wave.voidsetSpawnDelay(int delay) Gets the delay in milliseconds between spawning individual Entities of one wave.voidsetSpawnInterval(int interval) Sets the interval in milliseconds between each spawn wave.voidSets the spawn mode.Methods inherited from interface de.gurkenlabs.litiengine.IUpdateable
update
-
Method Details
-
createNew
T createNew()Creates a new instance of the provided Entity type.- Returns:
- the Entity instance which will be spawned
-
getSpawnAmount
int getSpawnAmount()Gets the amount of Entities that are spawned in each wave.- Returns:
- the spawn amount
-
getSpawnInterval
int getSpawnInterval()Gets the interval between spawn waves.- Returns:
- the spawn interval
-
getSpawnDelay
int getSpawnDelay()Gets the delay between spawning individual Entities of one wave.- Returns:
- the spawn delay
-
getSpawnMode
IEntitySpawner.SpawnMode getSpawnMode()Gets the spawn mode for an EntitySpawner.- Returns:
- the spawn mode
- See Also:
-
getSpawnPoints
List<Spawnpoint> getSpawnPoints()Gets the list of SpawnPoints that a EntitySpawner uses.- Returns:
- the spawn points
-
setSpawnAmount
void setSpawnAmount(int amount) Sets the amount of Entities that spawn in each wave.- Parameters:
amount- the new amount
-
setSpawnInterval
void setSpawnInterval(int interval) Sets the interval in milliseconds between each spawn wave.- Parameters:
interval- the new interval
-
setSpawnDelay
void setSpawnDelay(int delay) Gets the delay in milliseconds between spawning individual Entities of one wave.- Parameters:
delay- the new spawn delay
-
setSpawnMode
Sets the spawn mode.- Parameters:
mode- the new spawn mode- See Also:
-