lab  2016-03-28
lightweight ai behaviour trees framework for Unity 3D
lab.AFlowNode Class Referenceabstract

Abstract, base class for flow nodes. More...

Inherits lab.ANode.

Inherited by lab.InverterNode, lab.RepeaterNode, lab.SelectorNode, lab.SequenceNode, and lab.SucceederNode.

Public Member Functions

abstract bool AddNode (ANode node)
 Adds new node as a child. More...
 
abstract bool RemoveNode (ANode node)
 Removes child node. More...
 
abstract ANode GetNode (int i)
 Gets child node at index. More...
 
- Public Member Functions inherited from lab.ANode
abstract bool Run (AiBlackboard parameters, IList< AiTree > trees, List< ATaskScript > tasks)
 Runs this node. More...
 
abstract bool DebugRun (AiBlackboard parameters, IList< AiTree > trees, int level, int nodeIndex)
 Runs debug this node. More...
 

Properties

abstract int NodeCount [get]
 Gets count of child nodes. More...
 

Detailed Description

Abstract, base class for flow nodes.

AFlowNode is a type of ANode that composites other nodes. That means, only AFlowNode can be a root (first node) in AiTree.

Member Function Documentation

abstract bool lab.AFlowNode.AddNode ( ANode  node)
pure virtual

Adds new node as a child.

Parameters
nodeNode to be added as child.
Returns
True if adding succeed. Otherwise false.

Implemented in lab.RepeaterNode, lab.SelectorNode, lab.SequenceNode, lab.InverterNode, and lab.SucceederNode.

abstract ANode lab.AFlowNode.GetNode ( int  i)
pure virtual

Gets child node at index.

Parameters
iIndex of child node to get.
Returns
Child node under i index.

Implemented in lab.RepeaterNode, lab.InverterNode, lab.SelectorNode, lab.SequenceNode, and lab.SucceederNode.

abstract bool lab.AFlowNode.RemoveNode ( ANode  node)
pure virtual

Removes child node.

Parameters
nodeChild node to remove.
Returns
True if removing succeed. Otherwise false.

Implemented in lab.SelectorNode, lab.SequenceNode, lab.RepeaterNode, lab.InverterNode, and lab.SucceederNode.

Property Documentation

abstract int lab.AFlowNode.NodeCount
get

Gets count of child nodes.


The documentation for this class was generated from the following file: