Arbor 3: FSM & BT Graph Editor  3.1.3
BehaviourTreeInternal Class Reference

Internal class of Arbor.BehaviourTree. More...

Inheritance diagram for BehaviourTreeInternal:
NodeGraph BehaviourTree

Public Member Functions

void Play ()
 Start playing the behaviour tree. More...
 
void Stop ()
 Stopping playback of the behaviour tree. More...
 
void Pause ()
 Pause playback of the behaviour tree. More...
 
void Resume ()
 Resume playing behaviour tree. More...
 
CompositeNode CreateComposite (Vector2 position, int nodeID, System.Type classType)
 Create Composite. More...
 
CompositeNode CreateComposite (Vector2 position, System.Type classType)
 Create Composite. More...
 
ActionNode CreateAction (Vector2 position, int nodeID, System.Type classType)
 Create ActionNode. More...
 
ActionNode CreateAction (Vector2 position, System.Type classType)
 Create ActionNode. More...
 
void CalculatePriority ()
 Calculate priority of nodes. More...
 
override void OnValidateNodes ()
 Called when the node is changed. More...
 
bool CheckLoop (TreeNodeBase parentNode, TreeNodeBase childNode)
 Check whether the connection of the node is looping. More...
 
NodeBranch ConnectBranch (int branchID, TreeNodeBase parentNode, TreeNodeBase childNode)
 Connect NodeBranch. More...
 
NodeBranch ConnectBranch (TreeNodeBase parentNode, TreeNodeBase childNode)
 Connect NodeBranch. More...
 
void DisconnectBranch (NodeBranch branch)
 Disconnect NodeBranch More...
 
void Execute ()
 Execute manually. More...
 
- Public Member Functions inherited from NodeGraph
Node GetNodeFromIndex (int index)
 Get Node from index. More...
 
Node GetNodeFromID (int nodeID)
 Gets Arbor.Node from the node identifier. More...
 
CalculatorNode GetCalculatorFromIndex (int index)
 Get CalculatorNode from index. More...
 
int GetCalculatorIndex (CalculatorNode calculator)
 Get CalculatorNode index. More...
 
CalculatorNode GetCalculatorFromID (int calculatorID)
 Gets Arbor.CalculatorNode from the calculator identifier. More...
 
CalculatorNode CreateCalculator (int nodeID, System.Type calculatorType)
 Create calculator. More...
 
CalculatorNode CreateCalculator (System.Type calculatorType)
 Create calculator. More...
 
CalculatorNode FindCalculator (Calculator calculator)
 Acquisition of CalculatorNodes Calculator belongs. More...
 
bool DeleteCalculator (CalculatorNode calculatorNode)
 Delete calculator. More...
 
CommentNode GetCommentFromIndex (int index)
 Get CommentNode from index. More...
 
int GetCommentIndex (CommentNode comment)
 Get CommentNode index. More...
 
CommentNode GetCommentFromID (int commentID)
 Gets Arbor.CommentNode from the comment identifier. More...
 
CommentNode CreateComment (int nodeID)
 Create comment. More...
 
CommentNode CreateComment ()
 Create comment. More...
 
void DeleteComment (CommentNode comment)
 Delete comment. More...
 
GroupNode GetGroupFromIndex (int index)
 Get GroupNode from index. More...
 
GroupNode CreateGroup (int nodeID)
 Create group. More...
 
GroupNode CreateGroup ()
 Create group. More...
 
void DeleteGroup (GroupNode group)
 Delete group. More...
 
GroupNode GetGroupFromID (int groupID)
 Gets Arbor.GroupNode from the group identifier. More...
 
CalculatorBranchRerouteNode CreateCalculatorBranchRerouteNode (Vector2 position, System.Type type, int nodeID)
 Create CalculatorBranchRerouteNode. More...
 
CalculatorBranchRerouteNode CreateCalculatorBranchRerouteNode (Vector2 position, System.Type type)
 Create CalculatorBranchRerouteNode. More...
 
void DeleteCalculatorBranchRerouteNode (CalculatorBranchRerouteNode rerouteNode)
 Delete CalculatorBranchRerouteNode. More...
 
bool DeleteNode (Node node)
 Delete node. More...
 
Node FindNodeContainsBehaviour (NodeBehaviour behaviour)
 Acquisition of nodes NodeBehaviour belongs. More...
 
CalculatorBranch GetCalculatorBranchFromIndex (int index)
 Get CalculatorBranch from index. More...
 
int GetCalculatorBranchIndex (CalculatorBranch branch)
 Get CalculatorBranch index. More...
 
CalculatorBranch GetCalculatorBranchFromID (int branchID)
 Gets Arbor.CalculatorBranch from the calculator branch identifier. More...
 
CalculatorBranch ConnectCalculatorBranch (int branchID, int inputNodeID, Object inputObj, CalculatorSlot inputSlot, int outputNodeID, Object outputObj, CalculatorSlot outputSlot)
 Connect CalculatorSlot. More...
 
CalculatorBranch ConnectCalculatorBranch (int inputNodeID, Object inputObj, CalculatorSlot inputSlot, int outputNodeID, Object outputObj, CalculatorSlot outputSlot)
 Connect CalculatorSlot. More...
 
void DisconnectCalculatorBranch (Object obj)
 Method to be used internally. More...
 
void DeleteCalculatorBranch (CalculatorBranch branch)
 Delete calculator branch. More...
 
bool CheckLoopCalculatorBranch (int inputNodeID, Object inputObj, int outputNodeID, Object outputObj)
 Check if CalculatorBranch is looping. More...
 
delegate void NodeGraphCallback (NodeGraph nodeGraph)
 Delegate for NodeGraph callback More...
 
void DestroySubComponents ()
 Method to be used internally. More...
 
override string ToString ()
 Convert graph to string (for debugging). More...
 

Public Attributes

bool playOnStart = true
 Flag to be played at the start. More...
 
bool restartOnFinish = true
 Flag to restart at finish. More...
 
UpdateSettings updateSettings = new UpdateSettings()
 Settings related to updating. More...
 
ExecutionSettings executionSettings = new ExecutionSettings()
 Settings related to execution. More...
 
- Public Attributes inherited from NodeGraph
string graphName
 The Graph name. More...
 

Protected Member Functions

sealed override void OnReset ()
 Reset or create callback. More...
 
override bool OnDeleteNode (Node node)
 Delete node. More...
 
- Protected Member Functions inherited from NodeGraph
virtual void OnValidate ()
 See MonoBehaviour.OnValidate. More...
 

Properties

PlayState playState [get]
 Play state More...
 
NodeBranchies nodeBranchies [get]
 Get NodeBranch List More...
 
CompositeNodeList compositeNodes [get]
 Get CompositeNode List More...
 
ActionNodeList actionNodes [get]
 Get ActionNode List More...
 
RootNode rootNode [get]
 Get RootNode More...
 
- Properties inherited from NodeGraph
string displayGraphName [get]
 Display name of the node graph. More...
 
NodeGraph parentGraph [get]
 Parent graph More...
 
NodeGraph rootGraph [get]
 Root graph More...
 
Object ownerBehaviourObject [get, set]
 Object of NodeBehaviour own this graph More...
 
NodeBehaviour ownerBehaviour [get, set]
 NodeBehaviour is the owner of this graph More...
 
bool external [get]
 Flag instantiated from external graph More...
 
int nodeCount [get]
 Get a count of Node. More...
 
int calculatorCount [get]
 Get a count of CalculatorNode. More...
 
CalculatorNode[] calculators [get]
 Gets all of Arbor.CalculatorNode. More...
 
int commentCount [get]
 Get a count of CommentNode. More...
 
CommentNode[] comments [get]
 Gets all of Arbor.CommentNode. More...
 
int groupCount [get]
 Get a count of GroupNode. More...
 
CalculatorBranchRerouteNodeList calculatorBranchRerouteNodes [get]
 CalculatorBranchRerouteNode list More...
 
int calculatorBranchCount [get]
 Get a count of CalculatorBranch. More...
 
CalculatorBranch[] calculatorBranchies [get]
 Gets all of Arbor.CalculatorBranch. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from NodeGraph
static NodeGraph FindGraph (string name)
 Get the NodeGraph that in the scene with the name. More...
 
static NodeGraph FindGraph (string name, System.Type type)
 Get the NodeGraph that in the scene with the name. More...
 
static T FindGraph< T > (string name)
 Get the NodeGraph that in the scene with the name. More...
 
static NodeGraph[] FindGraphs (string name)
 Get the NodeGraph of the same name that is in the scene. More...
 
static NodeGraph[] FindGraphs (string name, System.Type type)
 Get the NodeGraph of the same name that is in the scene. More...
 
static T[] FindGraphs< T > (string name)
 Get the NodeGraph of the same name that is in the scene. More...
 
static NodeGraph FindGraph (GameObject gameObject, string name)
 Get NodeGraph in the name that has been attached to the GameObject. More...
 
static NodeGraph FindGraph (GameObject gameObject, string name, System.Type type)
 Get NodeGraph in the name that has been attached to the GameObject. More...
 
static T FindGraph< T > (GameObject gameObject, string name)
 Get NodeGraph in the name that has been attached to the GameObject. More...
 
static NodeGraph[] FindGraphs (GameObject gameObject, string name)
 Get the NodeGraph of the same name that is attached to a GameObject. More...
 
static NodeGraph[] FindGraphs (GameObject gameObject, string name, System.Type type)
 Get the NodeGraph of the same name that is attached to a GameObject. More...
 
static T[] FindGraphs< T > (GameObject gameObject, string name)
 Get the NodeGraph of the same name that is attached to a GameObject. More...
 
static NodeGraph Create (GameObject gameObject, System.Type classType)
 Create NodeGraph More...
 
static GraphType Create< GraphType > (GameObject gameObject)
 Create NodeGraph More...
 
static NodeGraph Instantiate (NodeGraph sourceGraph, NodeBehaviour ownerBehaviour)
 Instantiate NodeGraph More...
 
static GraphType Instantiate< GraphType > (GraphType sourceGraph, NodeBehaviour ownerBehaviour)
 Instantiate NodeGraph More...
 
static void Destroy (NodeGraph nodeGraph)
 Destroy NodeGraph More...
 
- Events inherited from NodeGraph
NodeGraphCallback destroyCallback
 Call back when being destroyed More...
 
NodeGraphCallback stateChangedCallback
 Call back when the state changes More...
 

Detailed Description

Internal class of Arbor.BehaviourTree.

To actually attach to GameObject is to use the Arbor.BehaviourTree.

Member Function Documentation

void CalculatePriority ( )

Calculate priority of nodes.

bool CheckLoop ( TreeNodeBase  parentNode,
TreeNodeBase  childNode 
)

Check whether the connection of the node is looping.

Parameters
parentNodeParent node
childNodeChild node
Returns
Returns true if it is looping.
NodeBranch ConnectBranch ( int  branchID,
TreeNodeBase  parentNode,
TreeNodeBase  childNode 
)

Connect NodeBranch.

Parameters
branchIDID of the NodeBranch to be created
parentNodeParent node.
childNodeChild node.
Returns
Connected NodeBranch
NodeBranch ConnectBranch ( TreeNodeBase  parentNode,
TreeNodeBase  childNode 
)

Connect NodeBranch.

Parameters
parentNodeParent node.
childNodeChild node.
Returns
Connected NodeBranch
ActionNode CreateAction ( Vector2  position,
int  nodeID,
System.Type  classType 
)

Create ActionNode.

Parameters
positionNode position
nodeIDNode ID
classTypeActionBehaviour type
Returns
The created action node.
ActionNode CreateAction ( Vector2  position,
System.Type  classType 
)

Create ActionNode.

Parameters
positionNode position
classTypeActionBehaviour type
Returns
The created action node.
CompositeNode CreateComposite ( Vector2  position,
int  nodeID,
System.Type  classType 
)

Create Composite.

Parameters
positionNode position
nodeIDNode ID
classTypeCompositeBehaviour type
Returns
The created coomposite node.
CompositeNode CreateComposite ( Vector2  position,
System.Type  classType 
)

Create Composite.

Parameters
positionNode position
classTypeCompositeBehaviour type
Returns
The created coomposite node.
void DisconnectBranch ( NodeBranch  branch)

Disconnect NodeBranch

Parameters
branchDisconnect NodeBranch
void Execute ( )

Execute manually.

Please call this method at any timing when UpdateSettings.type is Manual.

override bool OnDeleteNode ( Node  node)
protectedvirtual

Delete node.

Parameters
nodeThe node to delete
Returns
Returns true if deleted, false otherwise.

Implements NodeGraph.

sealed override void OnReset ( )
protectedvirtual

Reset or create callback.

Reimplemented from NodeGraph.

override void OnValidateNodes ( )
virtual

Called when the node is changed.

Reimplemented from NodeGraph.

void Pause ( )

Pause playback of the behaviour tree.

void Play ( )

Start playing the behaviour tree.

void Resume ( )

Resume playing behaviour tree.

void Stop ( )

Stopping playback of the behaviour tree.

Member Data Documentation

ExecutionSettings executionSettings = new ExecutionSettings()

Settings related to execution.

bool playOnStart = true

Flag to be played at the start.

bool restartOnFinish = true

Flag to restart at finish.

UpdateSettings updateSettings = new UpdateSettings()

Settings related to updating.

Property Documentation

ActionNodeList actionNodes
get

Get ActionNode List

CompositeNodeList compositeNodes
get

Get CompositeNode List

NodeBranchies nodeBranchies
get

Get NodeBranch List

PlayState playState
get

Play state

RootNode rootNode
get

Get RootNode