Class MazePathFindingTask

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

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

    • MazePathFindingTask

      public MazePathFindingTask(com.badlogic.gdx.math.GridPoint2 target, Maze maze)
  • Method Details

    • start

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

      public void update()
      Updates this task, updates the next target in the movement task, computes new path
      Specified by:
      update in interface Task
      Overrides:
      update in class DefaultTask
    • setTarget

      public void setTarget(com.badlogic.gdx.math.GridPoint2 target)
      Sets the target to find the path to
      Parameters:
      target - the target to find the path to
    • stop

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