![]() |
lab
2016-03-28
lightweight ai behaviour trees framework for Unity 3D
|
Behaviour tree with ai logic. More...
Public Member Functions | |
| bool | AddNode (ANode node) |
| Adds new node to this AiTree. More... | |
| bool | RemoveNode (ANode node) |
| Removes node from this AiTree. Also removes all connections between other nodes, so it doesn't have to be done manually. More... | |
| bool | ConnectNodes (AFlowNode from, ANode to) |
| Creates connection between one node to another. The connection is one one-way and tries to prevent circular to prevent infinity loops. More... | |
| bool | Run (AiBlackboard parameters, IList< AiTree > trees, List< ATaskScript > tasks) |
| Runs this tree behaviour. More... | |
| bool | DebugRun (AiBlackboard parameters, IList< AiTree > trees, int level) |
| Runs debug this tree behaviour. More... | |
Properties | |
| ANode | Root [get, set] |
| Sets/Gets root node for current AiTree. Only flow nodes can be root nodes. More... | |
| IList< ANode > | Nodes [get] |
| Gets readonly list of all nodes assigned to this AiTree. More... | |
Behaviour tree with ai logic.
Single ai tree that can be run.
| bool lab.AiTree.AddNode | ( | ANode | node | ) |
Creates connection between one node to another. The connection is one one-way and tries to prevent circular to prevent infinity loops.
| from | A node that is higher in hierarchy. |
| to | A node that is lower in hierarchy. |
| bool lab.AiTree.DebugRun | ( | AiBlackboard | parameters, |
| IList< AiTree > | trees, | ||
| int | level | ||
| ) |
Runs debug this tree behaviour.
| parameters | AiBlackboard with global parameters. |
| trees | Readonly list with all ai trees. |
| level | Level of how deep we are in this AiTree. |
| bool lab.AiTree.RemoveNode | ( | ANode | node | ) |
| bool lab.AiTree.Run | ( | AiBlackboard | parameters, |
| IList< AiTree > | trees, | ||
| List< ATaskScript > | tasks | ||
| ) |
Runs this tree behaviour.
| parameters | AiBlackboard with global parameters. |
| trees | Readonly list with all ai trees. |
| tasks | List of task scripts to bind with task nodes. |
|
getset |
Sets/Gets root node for current AiTree. Only flow nodes can be root nodes.