Class PathFollowTask

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

public class PathFollowTask extends DefaultTask implements PriorityTask
  • Constructor Details

    • PathFollowTask

      public PathFollowTask(com.badlogic.gdx.math.Vector2 targetPos, float waitingTime)
      Task to make an entity follow a path to a target position.
      Parameters:
      targetPos - The target position to move to
      waitingTime - The making time from the recipe, scaled by any time factor like DEFAULT_TIMER if needed.
  • Method Details

    • getPriority

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

      public void start()
      Start the task
      Specified by:
      start in interface Task
      Overrides:
      start in class DefaultTask
    • create

      public void create(TaskRunner taskRunner)
      Create the Task
      Specified by:
      create in interface Task
      Overrides:
      create in class DefaultTask
      Parameters:
      taskRunner - Task runner to attach to
    • update

      public void update()
      Update the task
      Specified by:
      update in interface Task
      Overrides:
      update in class DefaultTask
    • triggerMoveToPredefinedPosition

      public void triggerMoveToPredefinedPosition()
      Trigger the move to the predefined position