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 EntityCreates a generic NPC to be used as a base entity by more specific NPC creation methods.static EntitycreateChild(Entity target) Creates an atlantis child NPC entity.static EntitycreateFriendlyCreature(Entity target) Creates a friendly creature NPC entity.static EntitycreateGuard(Entity target) Creates an atlantis guard NPC entity.static EntitycreateGymBro(Entity target) Creates an atlantis citizen entity.static EntitycreateHeracles(Entity target) Creates Heracles, the boss of the first level.static EntitycreateHumanGuard(Entity target) static EntitycreatemaleCitizen(Entity target) Creates an atlantis male NPC entity.static EntitycreateMegaPoop(Entity target) Creates Mega Poop, the boss of the second level.static EntitycreateOneLegGirl(Entity target) Creates an atlantis female NPC entity.static EntitycreatePlug(Entity target) static EntitycreatePlumberFriend(Entity target) static EntitycreatePoops(Entity target) Creates Heracles, the boss of the first level.static EntitycreatTestNPC(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
 
 -