Class ShippingGameArea

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

public class ShippingGameArea extends GameArea
The "Shipping" area of the game map. This class: - Builds the terrain (background) - Spawns the player and necessary props - Generates the doors to the previous and next room
  • Constructor Details

    • ShippingGameArea

      public ShippingGameArea(TerrainFactory terrainFactory, CameraComponent cameraComponent)
      Initialise this ShippingGameArea to use the provided TerrainFactory and camera helper. The camera is used to size the screen-edge walls and place the right-side door trigger.
      Parameters:
      terrainFactory - TerrainFactory used to create the terrain for the GameArea (required).
      cameraComponent - Camera helper supplying an OrthographicCamera (optional but used here).
      Requires:
      terrainFactory != null
  • Method Details

    • create

      public void create()
      Create the game area, including terrain, static entities (trees), dynamic entities (player) Entry point for this room. This: - Loads textures - Creates the terrain, walls, and UI label - Spawns player, props, and enemies (to be added)
      Specified by:
      create in class GameArea
    • toString

      public String toString()
      Overrides:
      toString in class GameArea
    • getPlayer

      public Entity getPlayer()
      Description copied from class: GameArea
      allows manipulation of player character by loading function
      Specified by:
      getPlayer in class GameArea
      Returns:
      player entity
    • load

      public static ShippingGameArea load(TerrainFactory terrainFactory, CameraComponent camera)