java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.minigames.maze.components.tasks.MazeHuntTask
All Implemented Interfaces:
PriorityTask, Task

public class MazeHuntTask extends DefaultTask implements PriorityTask
Move to a given position, finishing when you get close enough. Requires an entity with a PhysicsMovementComponent.
  • Constructor Details

    • MazeHuntTask

      public MazeHuntTask(Entity target, Maze maze, int priority)
      Initialiser for the MazeHuntTask
      Parameters:
      target - the target to get to
      maze - the maze instance
      priority - the priority of this task
  • Method Details

    • start

      public void start()
      Starts this task
      Specified by:
      start in interface Task
      Overrides:
      start in class DefaultTask
    • update

      public void update()
      Updates the task, updates the targets position and starts the task if it is idle
      Specified by:
      update in interface Task
      Overrides:
      update in class DefaultTask
    • stop

      public void stop()
      Stops this task
      Specified by:
      stop in interface Task
      Overrides:
      stop in class DefaultTask
    • getPriority

      public int getPriority()
      Get task priority
      Specified by:
      getPriority in interface PriorityTask
      Returns:
      the priority of the MazeHuntTask