Interface Task

All Known Subinterfaces:
PriorityTask
All Known Implementing Classes:
ChaseTask, DeadTask, DefaultTask, JumpTask, MovementTask, ProjectileTask, TransportTask, WaitTask, WanderTask

public interface Task
An AI task can be started and stopped at any time. When updating, the task can succeed or fail.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    create(TaskRunner taskRunner)
    Create the task and attach it to the task runner.
    Get the current status of the task.
    void
    Start running this task.
    void
    Stop the task immediately.
    void
    Run one frame of the task.
  • Method Details

    • create

      void create(TaskRunner taskRunner)
      Create the task and attach it to the task runner.
      Parameters:
      taskRunner - Task runner to attach to
    • start

      void start()
      Start running this task. This will usually be called by an AI controller.
    • update

      void update()
      Run one frame of the task. Similar to the update() in Components.
    • stop

      void stop()
      Stop the task immediately. This can be called at any time by the AI controller.
    • getStatus

      Task.Status getStatus()
      Get the current status of the task.
      Returns:
      status