E
- type of the blackboard object that tasks use to read or modify game statepublic class Sequence<E> extends SingleRunningChildBranch<E>
Sequence
is a branch task that runs every children until one of them fails. If a child task succeeds, the selector
will start and run the next child task.Task.Status
currentChildIndex, randomChildren, runningChild
children
Constructor and Description |
---|
Sequence()
Creates a
Sequence branch with no children. |
Sequence(Array<Task<E>> tasks)
Creates a
Sequence branch with the given children. |
Sequence(Task<E>... tasks)
Creates a
Sequence branch with the given children. |
Modifier and Type | Method and Description |
---|---|
void |
childFail(Task<E> runningTask)
This method will be called when one of the children of this task fails
|
void |
childSuccess(Task<E> runningTask)
This method will be called when one of the children of this task succeeds
|
cancelRunningChildren, childRunning, copyTo, createRandomChildren, reset, run, start
addChildToTask, getChild, getChildCount
public Sequence()
Sequence
branch with no children.public Sequence(Array<Task<E>> tasks)
Sequence
branch with the given children.tasks
- the children of this taskpublic void childSuccess(Task<E> runningTask)
Task
childSuccess
in class SingleRunningChildBranch<E>
runningTask
- the task that succeededCopyright © 2017. All rights reserved.