Class LevelWaves

java.lang.Object
com.csse3200.game.entities.Entity
com.csse3200.game.components.tasks.waves.LevelWaves

public class LevelWaves extends Entity
  • Constructor Details

    • LevelWaves

      public LevelWaves(int spawnDelay)
      Constructor for the LevelWaves class
      Parameters:
      spawnDelay - time to elapse between each wave
  • Method Details

    • addWave

      public void addWave(WaveClass wave)
      Add a wave to the level and increment the total number of waves
      Parameters:
      wave - to be added
    • getWave

      public WaveClass getWave(int index)
      Retrieve a wave at an index in the list
      Parameters:
      index - wave number to be retireved
      Returns:
      instance of a wave class
    • spawnWave

      public void spawnWave()
      Spawn the wave and all the associated mobs for that wave
    • setWaveIndex

      public void setWaveIndex(int index)
      Set the wave index
      Parameters:
      index -
    • getNumWaves

      public int getNumWaves()
      Get the total number of waves in this level
      Returns:
      number of waves in the level
    • getSpawnDelay

      public float getSpawnDelay()
    • getStartTime

      public long getStartTime()
    • getMobIndex

      public int getMobIndex()
      Get the current mob index
      Returns:
      mob index
    • getWaveIndex

      public int getWaveIndex()
      Get the current wave index
      Returns:
      wave index
    • getWaves

      public List<WaveClass> getWaves()
    • toString

      public String toString()
      Overrides:
      toString in class Entity