Class EnemyFactory
java.lang.Object
com.deco2800.game.entities.factories.EnemyFactory
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 "EnemyConfigs".
If needed, this factory can be separated into more specific factories for entities with similar characteristics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
createBlueJoker
(AtlantisTerrainFactory terrainFactory) Creates a Blue Joker enemy entitystatic Entity
createBullet
(Entity from, Entity target, GameArea gameArea) Creates the bullet for the Trebuchet.static Entity
createSnake
(AtlantisTerrainFactory terrainFactory) Creates a Snake entitystatic Entity
createTitan
(AtlantisTerrainFactory terrainFactory) Creates a titan entitystatic Entity
createWolf
(AtlantisTerrainFactory terrainFactory) Creates a wolf entity
-
Method Details
-
createBullet
Creates the bullet for the Trebuchet.- Parameters:
from
- the position of the Trebuchet that the bullet will be created fromtarget
- the ships that the bullet aim to attackgameArea
- the game area- Returns:
- the bullet entity of Trebuchet.
-
createBlueJoker
Creates a Blue Joker enemy entity- Returns:
- Blue Joker enemy entity
-
createSnake
Creates a Snake entity- Returns:
- Snake entity
-
createWolf
Creates a wolf entity- Returns:
- entity
-
createTitan
Creates a titan entity- Returns:
- entity
-