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.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
createBobo
(Entity target) static Entity
createDoris
(NpcInteractionDisplay npcInteractionDisplay) static Entity
createGhost
(Entity target) Creates a ghost entity.static Entity
createGhostKing
(Entity target) Creates a ghost king entity.static Entity
createHeph
(NpcInteractionDisplay npcInteractionDisplay) static Entity
createKnight
(Entity target) static Entity
createMetis
(NpcInteractionDisplay npcInteractionDisplay) static Entity
static Entity
createNeutralLives
(Entity target) static Entity
createOrpheus
(NpcInteractionDisplay npcInteractionDisplay) static Entity
createPiranha
(Entity target) static Entity
createRobot
(Entity target) static Entity
createSlime
(Entity target) static Entity
createZoe
(NpcInteractionDisplay npcInteractionDisplay)
-
Method Details
-
createKnight
-
createRobot
-
createSlime
-
createBobo
-
createPiranha
-
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
-
createZoe
-
createMetis
-
createDoris
-
createHeph
-
createOrpheus
-
createNereus
-
createNeutralLives
-