Class EnemyFactory

java.lang.Object
com.csse3200.game.entities.factories.EnemyFactory

public class EnemyFactory extends Object
Factory for creating different types of enemies. - Base drones pursue the player but are otherwise idle. - Patrolling drones follow a patrol route.
  • Method Details

    • createDrone

      public static Entity createDrone(Entity target, com.badlogic.gdx.math.Vector2 spawnPos)
      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 chasing
      spawnPos - 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 chasing
      patrolRoute - contains list of waypoints in patrol route
      Returns:
      a patrolling drone enemy entity
    • createBomberDrone

      public static 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).
      Parameters:
      target - that drone pursues when bombing/chasing
      spawnPos - the starting world position of the enemy
      Returns:
      a bomber drone entity