Class ObstacleFactory

java.lang.Object
com.csse3200.game.entities.factories.system.ObstacleFactory

public class ObstacleFactory extends Object
Builds common static props and triggers used by the level (trees, floors, desks, crates, etc.). Each method returns a ready-to-place Entity with the right components already attached. Where needed we set a StaticBody so the object does not move, and assign a collider layer to decide if it should block the player (OBSTACLE) or just detect overlap (DEFAULT + sensor).
  • Method Details

    • createTree

      public static Entity createTree()
      Creates a tree entity.
      Returns:
      entity
    • createMarblePlatform

      public static Entity createMarblePlatform()
      Creates a Marble Platform for Fancy Rooms
      Returns:
      entity
    • createShipmentBoxes

      public static Entity createShipmentBoxes()
    • createShipmentCrane

      public static Entity createShipmentCrane()
    • createConveyor

      public static Entity createConveyor()
    • createLongFloor

      public static Entity createLongFloor()
      Long, thin floor piece for platforms/walkways. Solid so the player can stand on it.
      Returns:
      a static floor Entity
    • createBigThickFloor

      public static Entity createBigThickFloor()
      A very tall wall-like block (same art as thick floor but much taller). Good for visual dividers in the background.
      Returns:
      a tall static prop
    • createRailing

      public static Entity createRailing()
      Decorative railing. Visual-only: no physics/collision so it never blocks the player.
      Returns:
      a simple sprite Entity
    • createSmallStair

      public static Entity createSmallStair()
      Short stair-like prop the player cannot pass through.
      Returns:
      a static solid stair block
    • createThickFloor

      public static Entity createThickFloor()
      Regular thick floor block (short version of the big wall).
      Returns:
      a static ground piece
    • createThinFloor

      public static Entity createThinFloor()
    • createplatform2

      public static Entity createplatform2()
      creating the platform used in reception room
    • createholoclock

      public static Entity createholoclock()
      creating the clock used in reception room
    • createOfficeElevatorPlatform

      public static Entity createOfficeElevatorPlatform()
      creating the platform for Office area
    • createElevatorPlatform

      public static Entity createElevatorPlatform()
      creating the platform for Elevator area
    • createdesk_reception

      public static Entity createdesk_reception()
      creating the help desk used in reception room
    • createcomic_stand

      public static Entity createcomic_stand()
      creating the comic stand used in reception room
    • createplatform3

      public static Entity createplatform3()
      Creates a bit bigger platforms for Main hall
    • createMhall_sofa

      public static Entity createMhall_sofa()
      creates Sofa in bottom left in main hall
    • createMhall_screen

      public static Entity createMhall_screen()
      creates a screen decoration for main hall
    • createMhall_holo

      public static Entity createMhall_holo()
      creates a holographic decoration for main hall
    • createPurpleSpawnPad

      public static Entity createPurpleSpawnPad()
      Purple spawn pad prop. Solid so it rests on the ground like other props.
      Returns:
      a static pad entity
    • createRedSpawnPad

      public static Entity createRedSpawnPad()
      Red spawn pad prop. Identical behaviour to the purple pad.
      Returns:
      a static pad entity
    • createCrate

      public static Entity createCrate()
      Wooden crate that blocks the player (useful for cover or decoration).
      Returns:
      a static crate entity
    • createOfficeDesk

      public static Entity createOfficeDesk()
      Front-facing office desk placed on the thin floor. Solid to act like furniture.
      Returns:
      a static desk entity
    • createLargeEnergyPod

      public static Entity createLargeEnergyPod()
      Glowing energy pod that acts as a solid prop on the floor. Collider is slightly shorter (0.9) so it seats nicely on tiles when scaled.
      Returns:
      a static energy pod entity
    • createStorageCrateGreen

      public static Entity createStorageCrateGreen()
      Green futuristic storage crate.
      Returns:
      a static crate entity (green)
    • createStorageCrateDark

      public static Entity createStorageCrateDark()
      Dark futuristic storage crate.
      Returns:
      a static crate entity (dark)
    • createLargeSecurityCamera

      public static Entity createLargeSecurityCamera()
      Creates a large security camera entity. Decorative only; no physics or collider.
      Returns:
      A large security camera entity
    • createSecurityMonitor

      public static Entity createSecurityMonitor()
      Creates a security monitor entity. Static and collidable for gameplay interactions.
      Returns:
      A static collidable security monitor entity
    • createSecurityPlatform

      public static Entity createSecurityPlatform()
      Creates a security platform entity. Static and collidable to act as a solid prop or walkway.
      Returns:
      A static collidable security platform entity
    • createRedLight

      public static Entity createRedLight()
      Creates a red security light entity. Decorative only; no physics or collider.
      Returns:
      A decorative red light entity
    • createSecuritySystem

      public static Entity createSecuritySystem()
      Creates a security system console entity. Static and collidable for gameplay interactions.
      Returns:
      A static collidable security system entity
    • createLaboratory

      public static Entity createLaboratory()
      Creates a laboratory main station entity with collision. Acts as a solid, collidable obstacle in the Research Room.
      Returns:
      A static collidable laboratory entity
    • createMicroscope

      public static Entity createMicroscope()
      Creates a microscope entity with collision. The microscope is a static obstacle that blocks player movement.
      Returns:
      A static collidable microscope entity
    • createResearchDesk

      public static Entity createResearchDesk()
      Creates a research desk entity with collision. The desk serves as a static obstacle that blocks movement.
      Returns:
      A static collidable research desk entity
    • createResearchPod

      public static Entity createResearchPod()
      Creates a research pod entity with collision. Pods are large static obstacles in the Research Room.
      Returns:
      A static collidable research pod entity
    • createServerRack1

      public static Entity createServerRack1()
      Server rack (first variant, lighter colour).
      Returns:
      a static server rack entity
    • createServerRack2

      public static Entity createServerRack2()
      Server rack (second variant, darker colour).
      Returns:
      a static server rack entity
    • createDoor

      public static Entity createDoor()
      Makes a static door, no collision so that the player can pass through.
    • createWall

      public static Entity createWall(float width, float height)
    • createDoorTrigger

      public static Entity createDoorTrigger(float width, float height)
      Thin trigger line used for doors/exits. - Layer: DEFAULT - Sensor: true (detects overlap, does not push) You can attach your own component to react on contact (e.g., change room).
      Parameters:
      width - world width of the trigger
      height - world height of the trigger
      Returns:
      a non-blocking trigger entity