lab
2016-03-28
lightweight ai behaviour trees framework for Unity 3D
|
Flow node that inverts result from run. More...
Inherits lab.AFlowNode.
Public Member Functions | |
override bool | AddNode (ANode node) |
Adds new node as child. There can be only one child for InverterNode, so child will be overriden. More... | |
override bool | RemoveNode (ANode node) |
Removes child node. More... | |
override ANode | GetNode (int i) |
Gets child node. 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. InverterNode can give only two values, 0 or 1. More... | |
Properties inherited from lab.AFlowNode | |
abstract int | NodeCount [get] |
Gets count of child nodes. More... | |
Flow node that inverts result from run.
InverterNode has only one child node. On run, it takes result of child node and returns inverted value.
|
virtual |
Adds new node as child. There can be only one child for InverterNode, so child will be overriden.
node | Node to be added as a 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.
i | Index of child node to get. InverterNode has one child node, so only 0 will work. |
Implements lab.AFlowNode.
|
virtual |
Removes child node.
node | Child node to be removed. |
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. InverterNode can give only two values, 0 or 1.