Class NPCFactory
java.lang.Object
com.deco2800.game.entities.factories.NPCFactory
public class NPCFactory
extends java.lang.Object
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 Type Method Description static Entity
createFaceWorm(Entity target)
Creates a Face Worm.static Entity
createFlyingMonkey(Entity target)
Create Flying Monkeystatic Entity
createSmallMissile(Entity target)
Create a missilestatic Entity
createSpaceShip(Entity target)
Create Spaceship
-
Method Details
-
createFaceWorm
Creates a Face Worm.- Parameters:
target
- entity to chase- Returns:
- entity
-
createFlyingMonkey
Create Flying Monkey -
createSpaceShip
Create Spaceship- Parameters:
target
- the player entity- Returns:
- this spaceship entity
-
createSmallMissile
Create a missile- Parameters:
target
- the player entity- Returns:
- this missile entity
-