Skip to content

Obstacle Component

R.Jefferies edited this page Sep 2, 2026 · 2 revisions

First see: Entity Manager Component and Components

The Obstacle Component class is responsible for the creation of all possible obstacle types in the room entity with this component added.

Config

ObstacleConfig[] obstacles contains all obstacle types that will be built. If any new obstacles want to be added, or current obstacles want to be removed, it can be done by adding or removing the obstacles name from the ObstacleConfig.java file.

Usage

once create() is called through a room entity, the whole obstacles list stored will be iterated through checking each obstacle through a switch case, and creating the respective obstacle type through the ObstacleFactory.java file.

If an obstacle is added to the ObstacleConfig.java file, yet not added to the switch case on create() then an IllegalArgumentException will be thrown notifying of which obstacle type is unsupported.

Table of Contents

Home

Getting Started

Game Engine

Entities and Components
Input Handling

Features

Components
Achievements
Player
Items and Inventory
Enemies
Bosses
Interactable NPCs
Cutscenes and Dialogue
Music
Weapons
Abilities & Spells
Rooms and Dungeons
Game Screens and Areas
UI

Test Plans

Team 2

Troubleshooting

Clone this wiki locally