Class EnemyFactory

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

public class EnemyFactory 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(Entity target)
      Creates a chicken enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy chicken entity
    • createBear

      public static Entity createBear(Entity target)
      Creates a bear enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy bear entity
    • createBigsawfish

      public static Entity createBigsawfish(Entity target)
      Creates a big saw fish enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy bear entity
    • createMacaw

      public static Entity createMacaw(Entity target)
      Creates a green macaw enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy macaw entity
    • createOctopus

      public static Entity createOctopus(Entity target)
      Creates an undersea octopus enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy octopus entity
    • createBee

      public static Entity createBee(Entity target)
      Creates a bee enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy bee entity
    • createPigeon

      public static Entity createPigeon(Entity target)
      Creates a pigeon enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy pigeon entity
    • createFrog

      public static Entity createFrog(Entity target)
      Creates a frog enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy frog entity
    • createEel

      public static Entity createEel(Entity target)
      Creates a eel enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy frog entity
    • createMonkey

      public static Entity createMonkey(Entity target)
      Creates a monkey enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy monkey entity
    • createJoey

      public static Entity createJoey(Entity target)
      Creates a joey enemy.
      Parameters:
      target - entity to chase (player in most cases, but does not have to be)
      Returns:
      enemy joey entity