Class NPCFactory

java.lang.Object
com.csse3200.game.entities.factories.NPCFactory

public class NPCFactory extends Object
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 Details

    • createChicken

      public static Entity createChicken()
      Creates a chicken entity
      Returns:
      chicken entity
    • createCow

      public static Entity createCow()
      Creates a cow entity
      Returns:
      cow entity
    • createAstrolotl

      public static Entity createAstrolotl()
      Creates an Astrolotl entity
      Returns:
      Astrolotl entity
    • createOxygenEater

      public static Entity createOxygenEater()
      Creates an Oxygen Eater entity.
      Returns:
      Oxygen Eater entity
    • createFireFlies

      public static Entity createFireFlies()
      Creates a Fire Fly entity.
      Returns:
      Fire Fly entity
    • createShipEater

      public static Entity createShipEater()
      Creates a Ship Eater entity.
      Returns:
      Ship Eater entity
    • createDragonfly

      public static Entity createDragonfly()
      Creates a Dragonfly entity
      Returns:
      Dragonfly entity
    • createBat

      public static Entity createBat()
      Creates a Bat entity
      Returns:
      Bat entity