Interface IEntitySpawner<T extends IEntity>
- All Superinterfaces:
IUpdateable
- All Known Implementing Classes:
EntitySpawner
public interface IEntitySpawner<T extends IEntity>
extends IUpdateable
Nested Class Summary
Nested Classes Modifier and Type Interface 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 SpawnPointsMethod Summary
Modifier and Type Method 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.
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:
IEntitySpawner.SpawnMode
getSpawnPoints
java.util.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:
IEntitySpawner.SpawnMode