Class MazeGameArea

java.lang.Object
com.csse3200.game.areas.GameArea
com.csse3200.game.minigames.maze.areas.MazeGameArea
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public class MazeGameArea extends GameArea
Forest area for the demo game with trees, a player, and some enemies.
  • Field Details

  • Constructor Details

    • MazeGameArea

      public MazeGameArea(MazeTerrainFactory terrainFactory)
      Initialise this ForestGameArea to use the provided TerrainFactory.
      Parameters:
      terrainFactory - TerrainFactory used to create the terrain for the GameArea.
  • Method Details

    • create

      public void create()
      Create the game area, including terrain, static entities (trees), dynamic entities (player)
      Specified by:
      create in class GameArea
    • displayUI

      public void displayUI()
      Displays the maze game area
    • spawnJellyfish

      public void spawnJellyfish(int number, float minDistToPlayer)
      Spawns in the jellyfish npc. Jellyfish wander around, and do not actively seek the player.
    • spawnGreenJellyfish

      public void spawnGreenJellyfish(int number, float minDistToPlayer)
      Spawns in the jellyfish npc. Jellyfish wander around, and do not actively seek the player.
    • playMusic

      public void playMusic()
      Plays background music for the maze mini-game
      Specified by:
      playMusic in class GameArea
    • pauseMusic

      public void pauseMusic()
      Stops the music
      Specified by:
      pauseMusic in class GameArea
    • unloadAssets

      public void unloadAssets()
      Unloads assets from the screen
      Specified by:
      unloadAssets in class GameArea
    • dispose

      public void dispose()
      Disposes of assets used by this component, including the maze background music
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class GameArea
    • getPlayer

      public Entity getPlayer()
      gets the player
      Specified by:
      getPlayer in class GameArea
      Returns:
      player entity
    • getEnemies

      public List<Entity> getEnemies()
      Gets the list of enemies
      Specified by:
      getEnemies in class GameArea
      Returns:
      the list of enemies
    • getEnemies

      public List<Entity> getEnemies(Entity.EnemyType enemyType)
      Gets the list of enemies
      Parameters:
      enemyType - the type of enemy to get a list for
      Returns:
      the list of enemies
    • getEggs

      public List<Entity> getEggs()
      Gets the list of fish eggs
      Returns:
      the list of eggs
    • getBosses

      public List<Entity> getBosses()
      Specified by:
      getBosses in class GameArea
    • getFriendlyNPCs

      public List<Entity> getFriendlyNPCs()
      Specified by:
      getFriendlyNPCs in class GameArea
    • getMinigameNPCs

      public List<Entity> getMinigameNPCs()
      Specified by:
      getMinigameNPCs in class GameArea