Class ScannerTask

java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.components.tasks.scanner.ScannerTask
All Implemented Interfaces:
PriorityTask, Task

public class ScannerTask extends DefaultTask implements PriorityTask
ScannerTask implements the behaviour of GapScannerEntities that detect the conditions to trigger engineer spawning, i.e., No towers, no engineers, mobs within a certain distance.
  • Constructor Details

    • ScannerTask

      public ScannerTask()
      ScannerTask Constructor
  • Method Details

    • start

      public void start()
      Start method for the ScannerTask
      Specified by:
      start in interface Task
      Overrides:
      start in class DefaultTask
    • update

      public void update()
      Update method for the scanner task. Implements the scanning and spawning logic for populating the game area with engineers.
      Specified by:
      update in interface Task
      Overrides:
      update in class DefaultTask
    • getPriority

      public int getPriority()
      Return the priority of the task.
      Specified by:
      getPriority in interface PriorityTask
      Returns:
      the default priority of this task (a fixed value - no other tasks to run)