Class BossFactory
java.lang.Object
com.csse3200.game.entities.factories.characters.BossFactory
A factory class for creating Boss and NPC entities for the game.
This factory defines behavior, physics, and rendering properties for Boss-3
and provides a base NPC creation method that includes movement and attack logic.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
createBaseBoss2
(Entity target) static Entity
createBaseNPC
(Entity target) Creates a base NPC entity with default wandering, chasing, physics, and touch attack behavior.static Entity
createBlackhole
(com.badlogic.gdx.math.Vector2 pos, Entity target) static Entity
createBoss2
(Entity target) static Entity
createBoss3
(Entity target) Creates a Boss-3 entity with combat stats, rendering, scaling, and physics collider.static Entity
createFireball
(com.badlogic.gdx.math.Vector2 from, com.badlogic.gdx.math.Vector2 velocity) static Entity
createMissle
(com.badlogic.gdx.math.Vector2 from) static Entity
createRobot
(Entity target) static Entity
createRobotWithCocoons
(Entity target) Create Robot with cocoon spawning capability (enhanced version)static Entity
createWarning
(com.badlogic.gdx.math.Vector2 pos) static com.badlogic.gdx.math.Vector2[]
Get default spawn positions for cocoons
-
Constructor Details
-
BossFactory
public BossFactory()
-
-
Method Details
-
createRobot
-
createBoss2
-
createBoss3
Creates a Boss-3 entity with combat stats, rendering, scaling, and physics collider. This boss is capable of wandering, chasing, and attacking the player.- Parameters:
target
- The player entity that the boss will chase and attack.- Returns:
- A fully configured
Entity
representing Boss-3.
-
createBlackhole
-
createFireball
public static Entity createFireball(com.badlogic.gdx.math.Vector2 from, com.badlogic.gdx.math.Vector2 velocity) -
createWarning
-
createMissle
-
createBaseNPC
Creates a base NPC entity with default wandering, chasing, physics, and touch attack behavior. This is used as a template for other bosses or NPCs.- Parameters:
target
- The player entity that the NPC should follow or chase.- Returns:
- A configured
Entity
with AI movement and basic combat capability.
-
createBaseBoss2
-
getDefaultCocoonPositions
public static com.badlogic.gdx.math.Vector2[] getDefaultCocoonPositions()Get default spawn positions for cocoons- Returns:
- Array of cocoon spawn positions
-
createRobotWithCocoons
Create Robot with cocoon spawning capability (enhanced version)- Parameters:
target
- The player entity that the boss will chase and attack- Returns:
- Enhanced Robot entity with cocoon spawning capability
-