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
Creates an Astrolotl entitystatic Entity
Creates a Bat entitystatic Entity
Creates a chicken entitystatic Entity
Creates a cow entitystatic Entity
Creates a Dragonfly entitystatic Entity
Creates a Fire Fly entity.static Entity
Creates an Oxygen Eater entity.static Entity
Creates 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
-