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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
Creates a generic NPC to be used as a base entity by more specific NPC creation methods.static Entity
createChild
(Entity target) Creates an atlantis child NPC entity.static Entity
createFriendlyCreature
(Entity target) Creates a friendly creature NPC entity.static Entity
createGuard
(Entity target) Creates an atlantis guard NPC entity.static Entity
createGymBro
(Entity target) Creates an atlantis citizen entity.static Entity
createHeracles
(Entity target) Creates Heracles, the boss of the first level.static Entity
createHumanGuard
(Entity target) static Entity
createmaleCitizen
(Entity target) Creates an atlantis male NPC entity.static Entity
createMegaPoop
(Entity target) Creates Mega Poop, the boss of the second level.static Entity
createOneLegGirl
(Entity target) Creates an atlantis female NPC entity.static Entity
createPlug
(Entity target) static Entity
createPlumberFriend
(Entity target) static Entity
createPoops
(Entity target) Creates Heracles, the boss of the first level.static Entity
creatTestNPC
(String NPCName)
-
Constructor Details
-
NPCFactory
public NPCFactory()
-
-
Method Details
-
createOneLegGirl
Creates an atlantis female NPC entity.- Parameters:
target
- entity to stand- Returns:
- entity
-
createChild
Creates an atlantis child NPC entity.- Parameters:
target
- entity to stand- Returns:
- entity
-
createGuard
Creates an atlantis guard NPC entity.- Parameters:
target
- entity to stand- Returns:
- entity
-
createHumanGuard
-
createPlumberFriend
-
createFriendlyCreature
Creates a friendly creature NPC entity.- Parameters:
target
- entity to stand- Returns:
- entity
-
createmaleCitizen
Creates an atlantis male NPC entity.- Parameters:
target
- entity to stand- Returns:
- entity
-
createGymBro
Creates an atlantis citizen entity.- Parameters:
target
- entity to chase- Returns:
- entity
-
createHeracles
Creates Heracles, the boss of the first level.- Returns:
- entity
-
createPoops
Creates Heracles, the boss of the first level.- Returns:
- entity
-
createMegaPoop
Creates Mega Poop, the boss of the second level.- Returns:
- entity
-
createBaseNPC
Creates a generic NPC to be used as a base entity by more specific NPC creation methods.- Returns:
- entity
-
createPlug
-
creatTestNPC
-