Class TransportTask

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

public class TransportTask extends DefaultTask implements PriorityTask
Transport to an entity if it is still in attacking range.
  • Constructor Details

    • TransportTask

      public TransportTask(Entity target, int priority, float effectiveRange)
      Create a TransportTask with target entity, effective range and its task priority.
      Parameters:
      target - The target entity will be jumped at.
      priority - Task priority.
      effectiveRange - Maximum effective distance from the entity before giving up.
  • Method Details

    • start

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

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

      public void stop()
      Stop the transport task.
      Specified by:
      stop in interface Task
      Overrides:
      stop in class DefaultTask
    • getPriority

      public int getPriority()
      Get the priority of this task.
      Specified by:
      getPriority in interface PriorityTask
      Returns:
      integer representing the priority of this task.