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 TypeInterfaceDescription
    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
  • Method Summary

    Modifier and TypeMethodDescription
    TcreateNew()
    Creates a new instance of the provided Entity type.
    intgetSpawnAmount()
    Gets the amount of Entities that are spawned in each wave.
    intgetSpawnDelay()
    Gets the delay between spawning individual Entities of one wave.
    intgetSpawnInterval()
    Gets the interval between spawn waves.
    IEntitySpawner.SpawnModegetSpawnMode()
    Gets the spawn mode for an EntitySpawner.
    java.util.List<Spawnpoint>getSpawnPoints()
    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.
    voidsetSpawnMode​(IEntitySpawner.SpawnMode mode)
    Sets 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:
      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

      void setSpawnMode​(IEntitySpawner.SpawnMode mode)
      Sets the spawn mode.
      Parameters:
      mode - the new spawn mode
      See Also:
      IEntitySpawner.SpawnMode