Class MazeNPCFactory
java.lang.Object
com.csse3200.game.minigames.maze.entities.factories.MazeNPCFactory
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 AnglerFish
createAngler
(Entity target) Creates the angler fish NPCstatic ElectricEel
Creates the eel npcstatic FishEgg
Creates the fish egg npcstatic GreenJellyfish
Creates the green jellyfish npcstatic Jellyfish
Creates the jellyfish npcstatic Octopus
createOctopus
(Entity target) Creates the octopus NPCstatic Turtle
createTurtle
(Entity carry) Creates the turtle npc
-
Method Details
-
createAngler
Creates the angler fish NPC- Parameters:
target
- entity that the angler chases- Returns:
- the angular fish
-
createOctopus
Creates the octopus NPC- Parameters:
target
- entity that the octopus chases- Returns:
- the octopus
-
createEel
Creates the eel npc- Parameters:
target
- entity that the eel chases- Returns:
- the eel npc
-
createJellyfish
Creates the jellyfish npc- Returns:
- the jellyfish
-
createGreenJellyfish
Creates the green jellyfish npc- Returns:
- the jellyfish
-
createTurtle
Creates the turtle npc- Returns:
- the turtle
-
createFishEgg
Creates the fish egg npc- Returns:
- the fish egg npc
-