Class UndergroundGameArea

java.lang.Object
com.deco2800.game.areas.GameArea
com.deco2800.game.areas.UndergroundGameArea
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

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

    • GuardPosition

      public static com.badlogic.gdx.math.GridPoint2 GuardPosition
    • GuardDialoguePosition

      public static com.badlogic.gdx.math.GridPoint2 GuardDialoguePosition
    • friendlycreaturePosition

      public static com.badlogic.gdx.math.GridPoint2 friendlycreaturePosition
    • friendlycreatureDialoguePosition

      public static com.badlogic.gdx.math.GridPoint2 friendlycreatureDialoguePosition
  • Constructor Details

    • UndergroundGameArea

      public UndergroundGameArea(TerrainFactory terrainFactory)
  • Method Details

    • getPlayer

      public Entity getPlayer()
      Get the player entity from the map.
      Overrides:
      getPlayer in class GameArea
      Returns:
      player entity.
    • create

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

      public static boolean ifMegaPoopOnMap()
      Check if Mega Poop is alive on map
    • spawnCraftingTable

      public void spawnCraftingTable()
      Spawns the crafting table entity on the underground map
    • getGuardPosition

      public static com.badlogic.gdx.math.GridPoint2 getGuardPosition()
    • getFriendlycreaturePosition

      public static com.badlogic.gdx.math.Vector2 getFriendlycreaturePosition(com.badlogic.gdx.math.GridPoint2 friendlycreaturePosition)
    • spawnWeaponProjectile

      public void spawnWeaponProjectile()
      Spawns a projectile at the player entity's coordinates.
    • spawnPlayerAOE

      public Entity spawnPlayerAOE()
      Spawns an AOE attack at the player entity's coordinates.
    • removeProjectileOnMap

      public static void removeProjectileOnMap(Entity entityToRemove)
    • dispose

      public void dispose()
      Description copied from class: GameArea
      Dispose of all internal entities in the area
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class GameArea
    • toString

      public String toString()
      toString returning a string of the classes name
      Overrides:
      toString in class Object
      Returns:
      (String) class name
    • removeAuraOnMap

      public static void removeAuraOnMap(Entity entityToRemove)
    • removeItemOnMap

      public static void removeItemOnMap(Entity entityToRemove)
    • spawnPlayerProjectileSpray

      public void spawnPlayerProjectileSpray()
      Spawns a spray of projectiles at the player entity's coordinates.
    • spawnPlayerProjectileCone

      public void spawnPlayerProjectileCone()
      Spawns a spray of projectiles at the player entity's coordinates.