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 Entity
createBaseWaterSlime
(int health) Creates a water slime entity.static Entity
createDeflectWizard
(int health) Creates a wizard that can deflect bulletsstatic Entity
createDodgingDragonKnight
(int health) Create a dodging Dragon Knightstatic Entity
createDragonKnight
(int health) Creates a dragon Knight entitystatic Entity
createFireWorm
(int health) Creates a fire worm entity.static Entity
Creates a ghost entity.static Entity
Creates a ghost king entity.static Entity
Creates a generic NPC to be used as a base entity by more specific NPC creation methods.static Entity
Creates a generic NPC to be used as a base entity by more specific NPC creation methods.static Entity
createSkeleton
(int health) Creates a fire worm entity.static Entity
createSplittingWaterSlime
(int health) Create Splitting water slimestatic Entity
createSplittingXenoGrunt
(int health) static Entity
createWaterQueen
(int health) Creates a water queen entity.static Entity
createWizard
(int health) Creates a wizard entity.static Entity
createXenoGrunt
(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:
-