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 EntityCreates an Astrolotl entitystatic EntityCreates a Bat entitystatic EntityCreates a chicken entitystatic EntityCreates a cow entitystatic EntityCreates a Dragonfly entitystatic EntityCreates a Fire Fly entity.static EntityCreates an Oxygen Eater entity.static EntityCreates a Ship Eater entity.
-
Method Details
-
createChicken
Creates a chicken entity- Returns:
- chicken entity
-
createCow
Creates a cow entity- Returns:
- cow entity
-
createAstrolotl
Creates an Astrolotl entity- Returns:
- Astrolotl entity
-
createOxygenEater
Creates an Oxygen Eater entity.- Returns:
- Oxygen Eater entity
-
createFireFlies
Creates a Fire Fly entity.- Returns:
- Fire Fly entity
-
createShipEater
Creates a Ship Eater entity.- Returns:
- Ship Eater entity
-
createDragonfly
Creates a Dragonfly entity- Returns:
- Dragonfly entity
-
createBat
Creates a Bat entity- Returns:
- Bat entity
-