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.StatuscurrentChildIndex, randomChildrenchildren| 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, startaddChildToTask, getChild, getChildCountpublic 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)
TaskchildSuccess in class SingleRunningChildBranch<E>runningTask - the task that succeededCopyright © 2018. All rights reserved.