Class NPCFactory
java.lang.Object
com.deco2800.game.entities.factories.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
createGhost
(Entity target) Creates a ghost entity.static Entity
createGhostKing
(Entity target) Creates a ghost king entity.
-
Method Details
-
createGhost
Creates a ghost entity.- Parameters:
target
- entity to chase- Returns:
- entity
-
createGhostKing
Creates a ghost king entity.- Parameters:
target
- entity to chase- Returns:
- entity
-