O- The type of Agent
It is required for anyone wanting to write their own logic that a Goal can
run to utilize this class. If you desire to use the builtin AI included with
GameRegistry.createBuilder(Class) and pass a builder to
At the beginning of every "AI" tick, all
AITasks that are added to
Goal are iterated through. If an
AITask is already
marked as "in use", that task's
continueUpdating() is checked for
is invoked, and the
AITask is "flagged" as unused for the parent
update() is invoked
to perform any major logic.
AITask is not currently flagged as "in use", then
is invoked. If
marked as "in use", and
start() is invoked. After
update() will be invoked to be used for the first time
in this "AI tick".
Regardless whether the
AITask was "in use" or not, if the
is now "in use",
continueUpdating() is called to verify the validity of the
reset() is called
to clean up the
|Modifier and Type||Method and Description|
Performs any reset necessary for this task during the current tick.
Invoked when the task is "started".
Performs any customary logic for this "task" to modify the parent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AbstractAITask(AITaskType type)
type- The type
public final AITaskType getType()
AITaskTypeof this task.
Goalthat is updating this task, if any.
public abstract void start()
public abstract boolean shouldUpdate()
AITaskshould be considered for "ticking" or
reset()are called for that "AI" tick.
public abstract void update()
public abstract boolean continueUpdating()
update()in this tick. If this returns
AITaskis removed from use and
public abstract void reset()