Class EnemyFactory
java.lang.Object
com.csse3200.game.entities.factories.EnemyFactory
Factory for creating different types of enemies.
- Base drones pursue the player but are otherwise idle.
- Patrolling drones follow a patrol route.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
createBomberDrone
(Entity target, com.badlogic.gdx.math.Vector2 spawnPos) Create a bomber-style drone enemy that chases the target and drops bombs when target is directly below (within a certain range).static Entity
createDrone
(Entity target, com.badlogic.gdx.math.Vector2 spawnPos) Creates a drone enemy that starts idle.static Entity
createPatrollingDrone
(Entity target, com.badlogic.gdx.math.Vector2[] patrolRoute) Same as basic drone enemy but patrols a given route, alternatively chasing a target when activated.
-
Method Details
-
createDrone
Creates a drone enemy that starts idle. When activated by a security camera, starts chasing its target. Has drone-specific animation, combat stats and chase task.- Parameters:
target
- that drone pursues when chasingspawnPos
- the starting world position of the enemy- Returns:
- drone enemy entity
-
createPatrollingDrone
public static Entity createPatrollingDrone(Entity target, com.badlogic.gdx.math.Vector2[] patrolRoute) Same as basic drone enemy but patrols a given route, alternatively chasing a target when activated.- Parameters:
target
- that drone pursues when chasingpatrolRoute
- contains list of waypoints in patrol route- Returns:
- a patrolling drone enemy entity
-
createBomberDrone
Create a bomber-style drone enemy that chases the target and drops bombs when target is directly below (within a certain range).- Parameters:
target
- that drone pursues when bombing/chasingspawnPos
- the starting world position of the enemy- Returns:
- a bomber drone entity
-