lab
2016-03-28
lightweight ai behaviour trees framework for Unity 3D
|
One of the most important flow nodes. If one of child nodes returns true after run, SelectorNode also will return true. More...
Inherits lab.AFlowNode.
Public Member Functions | |
override bool | AddNode (ANode node) |
Adds new node as a child. More... | |
override bool | RemoveNode (ANode node) |
Removes child node. More... | |
override ANode | GetNode (int i) |
Gets child node at index. More... | |
override bool | Run (AiBlackboard parameters, IList< AiTree > trees, List< ATaskScript > tasks) |
Runs this node. More... | |
override bool | DebugRun (AiBlackboard parameters, IList< AiTree > trees, int level, int nodeIndex) |
Runs debug this node. More... | |
Properties | |
override int | NodeCount [get] |
Gets count of child nodes. More... | |
Properties inherited from lab.AFlowNode | |
abstract int | NodeCount [get] |
Gets count of child nodes. More... | |
One of the most important flow nodes. If one of child nodes returns true after run, SelectorNode also will return true.
SelectorNode aggregates child nodes and runs them from first to last. It stops running after first child node run result that is true, that means not all child nodes must be invoked. If all child nodes returns false, this node will also return false as a run result.
|
virtual |
Adds new node as a child.
node | Node to be added as child. |
Implements lab.AFlowNode.
|
virtual |
Runs debug this node.
parameters | AiBlackboard with global parameters. |
trees | Readonly list with all ai trees. |
level | Level of how deep we are in this AiTree. |
nodeIndex | Index of current node in parent's node. If this is root, nodeIndex is 0. |
Implements lab.ANode.
|
virtual |
Gets child node at index.
i | Index of child node to get. |
Implements lab.AFlowNode.
|
virtual |
Removes child node.
node | Child node to remove. |
Implements lab.AFlowNode.
|
virtual |
Runs this node.
parameters | AiBlackboard with global parameters. |
trees | Readonly list with all ai trees. |
tasks | List of task scripts to bind with task nodes. |
Implements lab.ANode.
|
get |
Gets count of child nodes.