Class NPCFactory
java.lang.Object
com.csse3200.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 EntitycreateBaseWaterSlime(int health) Creates a water slime entity.static EntitycreateDeflectWizard(int health) Creates a wizard that can deflect bulletsstatic EntitycreateDodgingDragonKnight(int health) Create a dodging Dragon Knightstatic EntitycreateDragonKnight(int health) Creates a dragon Knight entitystatic EntitycreateFireWorm(int health) Creates a fire worm entity.static EntityCreates a ghost entity.static EntityCreates a ghost king entity.static EntityCreates a generic NPC to be used as a base entity by more specific NPC creation methods.static EntityCreates a generic NPC to be used as a base entity by more specific NPC creation methods.static EntitycreateSkeleton(int health) Creates a fire worm entity.static EntitycreateSplittingWaterSlime(int health) Create Splitting water slimestatic EntitycreateSplittingXenoGrunt(int health) static EntitycreateWaterQueen(int health) Creates a water queen entity.static EntitycreateWizard(int health) Creates a wizard entity.static EntitycreateXenoGrunt(int health) Creates a xeno grunt entity.
-
Method Details
-
createGhost
Creates a ghost entity.- Returns:
- entity
-
createGhostKing
Creates a ghost king entity.- Returns:
- entity
-
createSkeleton
Creates a fire worm entity.- Returns:
- entity
-
createWizard
Creates a wizard entity.- Returns:
- entity
-
createWaterQueen
Creates a water queen entity.- Returns:
- entity
-
createBaseWaterSlime
Creates a water slime entity.- Returns:
- entity
-
createFireWorm
Creates a fire worm entity.- Returns:
- entity
-
createDragonKnight
Creates a dragon Knight entity- Returns:
- entity
-
createXenoGrunt
Creates a xeno grunt entity.- Returns:
- entity
-
createMeleeBaseNPC
Creates a generic NPC to be used as a base entity by more specific NPC creation methods.- Returns:
- entity
-
createRangedBaseNPC
Creates a generic NPC to be used as a base entity by more specific NPC creation methods.- Returns:
- entity
-
createSplittingXenoGrunt
-
createSplittingWaterSlime
Create Splitting water slime- Returns:
-
createDodgingDragonKnight
Create a dodging Dragon Knight- Returns:
-
createDeflectWizard
Creates a wizard that can deflect bullets- Returns:
-