public interface IEntitySpawner<T extends IEntity> extends IUpdateable
Modifier and Type | Interface and Description |
---|---|
static class |
IEntitySpawner.SpawnMode
SpawnMode 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
|
Modifier and Type | Method and Description |
---|---|
T |
createNew()
Creates a new instance of the provided Entity type.
|
int |
getSpawnAmount()
Gets the amount of Entities that are spawned in each wave.
|
int |
getSpawnDelay()
Gets the delay between spawning individual Entities of one wave.
|
int |
getSpawnInterval()
Gets the interval between spawn waves.
|
IEntitySpawner.SpawnMode |
getSpawnMode()
Gets the spawn mode for an EntitySpawner.
|
java.util.List<Spawnpoint> |
getSpawnPoints()
Gets the list of SpawnPoints that a EntitySpawner uses.
|
void |
setSpawnAmount(int amount)
Sets the amount of Entities that spawn in each wave.
|
void |
setSpawnDelay(int delay)
Gets the delay in milliseconds between spawning individual Entities of one wave.
|
void |
setSpawnInterval(int interval)
Sets the interval in milliseconds between each spawn wave.
|
void |
setSpawnMode(IEntitySpawner.SpawnMode mode)
Sets the spawn mode.
|
update
T createNew()
int getSpawnAmount()
int getSpawnInterval()
int getSpawnDelay()
IEntitySpawner.SpawnMode getSpawnMode()
IEntitySpawner.SpawnMode
java.util.List<Spawnpoint> getSpawnPoints()
void setSpawnAmount(int amount)
amount
- the new amountvoid setSpawnInterval(int interval)
interval
- the new intervalvoid setSpawnDelay(int delay)
delay
- the new spawn delayvoid setSpawnMode(IEntitySpawner.SpawnMode mode)
mode
- the new spawn modeIEntitySpawner.SpawnMode