E - type of the blackboard object that tasks use to read or modify game state@TaskConstraint(minChildren=1) public abstract class BranchTask<E> extends Task<E>
Task.Status| Modifier and Type | Field and Description |
|---|---|
protected Array<Task<E>> |
children
The children of this branch task.
|
| Constructor and Description |
|---|
BranchTask()
Create a branch task with no children
|
BranchTask(Array<Task<E>> tasks)
Create a branch task with a list of children
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
addChildToTask(Task<E> child)
This method will add a child to the list of this task's children
|
protected Task<E> |
copyTo(Task<E> task)
Copies this task to the given task.
|
Task<E> |
getChild(int i)
Returns the child at the given index.
|
int |
getChildCount()
Returns the number of children of this task.
|
addChild, cancel, cancelRunningChildren, checkGuard, childFail, childRunning, childSuccess, cloneTask, end, fail, getGuard, getObject, getStatus, reset, run, running, setControl, setGuard, start, successprotected int addChildToTask(Task<E> child)
TaskaddChildToTask in class Task<E>child - the child task which will be addedpublic int getChildCount()
TaskgetChildCount in class Task<E>public Task<E> getChild(int i)
Taskprotected Task<E> copyTo(Task<E> task)
TaskTask.cloneTask() only if Task.TASK_CLONER is
null which is its default value.Copyright © 2017. All rights reserved.