Class ObstacleFactory
java.lang.Object
com.csse3200.game.entities.factories.system.ObstacleFactory
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 Summary
Modifier and TypeMethodDescriptionstatic Entity
A very tall wall-like block (same art as thick floor but much taller).static Entity
creating the comic stand used in reception roomstatic Entity
static Entity
Wooden crate that blocks the player (useful for cover or decoration).static Entity
creating the help desk used in reception roomstatic Entity
Makes a static door, no collision so that the player can pass through.static Entity
createDoorTrigger
(float width, float height) Thin trigger line used for doors/exits.static Entity
creating the platform for Elevator areastatic Entity
creating the clock used in reception roomstatic Entity
Creates a laboratory main station entity with collision.static Entity
Glowing energy pod that acts as a solid prop on the floor.static Entity
Creates a large security camera entity.static Entity
Long, thin floor piece for platforms/walkways.static Entity
Creates a Marble Platform for Fancy Roomsstatic Entity
creates a holographic decoration for main hallstatic Entity
creates a screen decoration for main hallstatic Entity
creates Sofa in bottom left in main hallstatic Entity
Creates a microscope entity with collision.static Entity
Front-facing office desk placed on the thin floor.static Entity
creating the platform for Office areastatic Entity
creating the platform used in reception roomstatic Entity
Creates a bit bigger platforms for Main hallstatic Entity
Purple spawn pad prop.static Entity
Decorative railing.static Entity
Creates a red security light entity.static Entity
Red spawn pad prop.static Entity
Creates a research desk entity with collision.static Entity
Creates a research pod entity with collision.static Entity
Creates a security monitor entity.static Entity
Creates a security platform entity.static Entity
Creates a security system console entity.static Entity
Server rack (first variant, lighter colour).static Entity
Server rack (second variant, darker colour).static Entity
static Entity
static Entity
Short stair-like prop the player cannot pass through.static Entity
Dark futuristic storage crate.static Entity
Green futuristic storage crate.static Entity
Regular thick floor block (short version of the big wall).static Entity
static Entity
Creates a tree entity.static Entity
createWall
(float width, float height)
-
Method Details
-
createTree
Creates a tree entity.- Returns:
- entity
-
createMarblePlatform
Creates a Marble Platform for Fancy Rooms- Returns:
- entity
-
createShipmentBoxes
-
createShipmentCrane
-
createConveyor
-
createLongFloor
Long, thin floor piece for platforms/walkways. Solid so the player can stand on it.- Returns:
- a static floor 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
Decorative railing. Visual-only: no physics/collision so it never blocks the player.- Returns:
- a simple sprite Entity
-
createSmallStair
Short stair-like prop the player cannot pass through.- Returns:
- a static solid stair block
-
createThickFloor
Regular thick floor block (short version of the big wall).- Returns:
- a static ground piece
-
createThinFloor
-
createplatform2
creating the platform used in reception room -
createholoclock
creating the clock used in reception room -
createOfficeElevatorPlatform
creating the platform for Office area -
createElevatorPlatform
creating the platform for Elevator area -
createdesk_reception
creating the help desk used in reception room -
createcomic_stand
creating the comic stand used in reception room -
createplatform3
Creates a bit bigger platforms for Main hall -
createMhall_sofa
creates Sofa in bottom left in main hall -
createMhall_screen
creates a screen decoration for main hall -
createMhall_holo
creates a holographic decoration for main hall -
createPurpleSpawnPad
Purple spawn pad prop. Solid so it rests on the ground like other props.- Returns:
- a static pad entity
-
createRedSpawnPad
Red spawn pad prop. Identical behaviour to the purple pad.- Returns:
- a static pad entity
-
createCrate
Wooden crate that blocks the player (useful for cover or decoration).- Returns:
- a static crate entity
-
createOfficeDesk
Front-facing office desk placed on the thin floor. Solid to act like furniture.- Returns:
- a static desk 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
Green futuristic storage crate.- Returns:
- a static crate entity (green)
-
createStorageCrateDark
Dark futuristic storage crate.- Returns:
- a static crate entity (dark)
-
createLargeSecurityCamera
Creates a large security camera entity. Decorative only; no physics or collider.- Returns:
- A large security camera entity
-
createSecurityMonitor
Creates a security monitor entity. Static and collidable for gameplay interactions.- Returns:
- A static collidable security monitor 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
Creates a red security light entity. Decorative only; no physics or collider.- Returns:
- A decorative red light entity
-
createSecuritySystem
Creates a security system console entity. Static and collidable for gameplay interactions.- Returns:
- A static collidable security system 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
Creates a microscope entity with collision. The microscope is a static obstacle that blocks player movement.- Returns:
- A static collidable microscope 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
Creates a research pod entity with collision. Pods are large static obstacles in the Research Room.- Returns:
- A static collidable research pod entity
-
createServerRack1
Server rack (first variant, lighter colour).- Returns:
- a static server rack entity
-
createServerRack2
Server rack (second variant, darker colour).- Returns:
- a static server rack entity
-
createDoor
Makes a static door, no collision so that the player can pass through. -
createWall
-
createDoorTrigger
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 triggerheight
- world height of the trigger- Returns:
- a non-blocking trigger entity
-