Class NPCFactory
java.lang.Object
com.csse3200.game.entities.factories.characters.NPCFactory
Factory to create non-playable character (NPC) entities with predefined components.
Each NPC entity type should have a creation method that returns a corresponding entity. Predefined entity properties can be loaded from configs stored as json files which are defined in "NPCConfigs".
If needed, this factory can be separated into more specific factories for entities with similar characteristics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
createDeepspin
(Entity target, GameArea area, float scalingFactor) Creates Deepspin enemy typestatic Entity
createGhostGPT
(Entity target, GameArea area, float scalingFactor) Creates GhostGPT enemy typestatic Entity
createGrokDroid
(Entity target, GameArea area, float scalingFactor) Creates GrokDroid enemy typestatic Entity
createRobot
(Entity target) Creates a robot entity.static Entity
createTurret
(Entity target, GameArea area, float scalingFactor) Creates Turret enemy typestatic Entity
createVroomba
(Entity target, float scalingFactor) Creates a Vroomba entity.
-
Method Details
-
createGhostGPT
Creates GhostGPT enemy type- Parameters:
target
- entity to chasearea
- the area/space it is living inscalingFactor
- The scale of increase in health and attack of the GhostGPT- Returns:
- entity
-
createRobot
Creates a robot entity.- Parameters:
target
- entity to chase (e.g. player)- Returns:
- robot entity
-
createDeepspin
Creates Deepspin enemy type- Parameters:
target
- entity to chasearea
- the area/space it is living inscalingFactor
- The scale of increase in health and attack of the DeepSpin- Returns:
- entity
-
createGrokDroid
Creates GrokDroid enemy type- Parameters:
target
- entity to chasearea
- the area/space it is living inscalingFactor
- The scale of increase in health and attack of the GrokDroid- Returns:
- entity
-
createVroomba
Creates a Vroomba entity.- Parameters:
target
- entity to chasescalingFactor
- The scale of increase in health and attack of the Vroomba- Returns:
- entity
-
createTurret
Creates Turret enemy type- Parameters:
target
- entity to chasearea
- the area/space it is living inscalingFactor
- The scale of increase in health and attack of the GhostGPT- Returns:
- entity
-