java.lang.Object
com.csse3200.game.minigames.maze.entities.factories.MazeNPCFactory

public class MazeNPCFactory 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

    • createAngler

      public static AnglerFish createAngler(Entity target)
      Creates the angler fish NPC
      Parameters:
      target - entity that the angler chases
      Returns:
      the angular fish
    • createOctopus

      public static Octopus createOctopus(Entity target)
      Creates the octopus NPC
      Parameters:
      target - entity that the octopus chases
      Returns:
      the octopus
    • createEel

      public static ElectricEel createEel(Entity target)
      Creates the eel npc
      Parameters:
      target - entity that the eel chases
      Returns:
      the eel npc
    • createJellyfish

      public static Jellyfish createJellyfish()
      Creates the jellyfish npc
      Returns:
      the jellyfish
    • createGreenJellyfish

      public static GreenJellyfish createGreenJellyfish()
      Creates the green jellyfish npc
      Returns:
      the jellyfish
    • createTurtle

      public static Turtle createTurtle(Entity carry)
      Creates the turtle npc
      Returns:
      the turtle
    • createFishEgg

      public static FishEgg createFishEgg()
      Creates the fish egg npc
      Returns:
      the fish egg npc