public abstract class EntitySpawner<T extends IEntity> extends java.lang.Object implements IEntitySpawner<T>
IEntitySpawner.SpawnMode| Constructor and Description |
|---|
EntitySpawner(java.util.List<Spawnpoint> spawnpoints,
int interval,
int amount)
Instantiates a new entity spawner.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected void |
spawnNewEntities()
Spawn new entities, depending on the
SpawnMode, spawnAmount, spawnDelay, and spawnInterval of an EntitySpawner. |
void |
update()
This method is called by the game loop on all objects that are attached to the loop.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateNewpublic EntitySpawner(java.util.List<Spawnpoint> spawnpoints, int interval, int amount)
spawnpoints - the spawnpointsinterval - the intervalamount - the amountpublic int getSpawnAmount()
IEntitySpawnergetSpawnAmount in interface IEntitySpawner<T extends IEntity>public int getSpawnInterval()
IEntitySpawnergetSpawnInterval in interface IEntitySpawner<T extends IEntity>public int getSpawnDelay()
IEntitySpawnergetSpawnDelay in interface IEntitySpawner<T extends IEntity>public IEntitySpawner.SpawnMode getSpawnMode()
IEntitySpawnergetSpawnMode in interface IEntitySpawner<T extends IEntity>IEntitySpawner.SpawnModepublic java.util.List<Spawnpoint> getSpawnPoints()
IEntitySpawnergetSpawnPoints in interface IEntitySpawner<T extends IEntity>public void setSpawnAmount(int amount)
IEntitySpawnersetSpawnAmount in interface IEntitySpawner<T extends IEntity>amount - the new amountpublic void setSpawnInterval(int interval)
IEntitySpawnersetSpawnInterval in interface IEntitySpawner<T extends IEntity>interval - the new intervalpublic void setSpawnDelay(int delay)
IEntitySpawnersetSpawnDelay in interface IEntitySpawner<T extends IEntity>delay - the new spawn delaypublic void setSpawnMode(IEntitySpawner.SpawnMode mode)
IEntitySpawnersetSpawnMode in interface IEntitySpawner<T extends IEntity>mode - the new spawn modeIEntitySpawner.SpawnModepublic void update()
IUpdateableClientConfiguration.update in interface IUpdateableClientConfiguration.setMaxFps(int)protected void spawnNewEntities()
SpawnMode, spawnAmount, spawnDelay, and spawnInterval of an EntitySpawner.SpawnMode