RAIN.Minds.BehaviorTreeMind Class Reference

BehaviorTreeMind is a Mind setup designed to integrate with the RAIN Behavior Tree system. Upon initialization, this mind will load the behavior tree designated by behaviorTreeFilename. It will then use the attached BTActivationManager to InitBehavior, SetVariables, and Act. This causes the BehaviorTree to be evaluated and executed at each timestep, with results applied to the agent owning this Mind. More...

Inheritance diagram for RAIN.Minds.BehaviorTreeMind:
RAIN.Core.Mind RAIN.Minds.GoalActionMind

List of all members.

Public Member Functions

override void Init (Agent agent)
 Init is called by the Agent upon startup. The Mind is initialized and the BehaviorTree is loaded.
override void Think (Agent agent, float deltaTime)
 Think is a no-op for behavior trees.
override void Act (Agent agent, float deltaTime)
 Act causes the BehaviorTree to execute.

Public Attributes

string behaviorTreeFilename
 The file name of the xml file defining the behavior tree root.
string rootName
BTActivationManager activationManager
 An ActivationManager used to manage linkage between RAIN, BehaviorTrees, and Unity.

Detailed Description

BehaviorTreeMind is a Mind setup designed to integrate with the RAIN Behavior Tree system. Upon initialization, this mind will load the behavior tree designated by behaviorTreeFilename. It will then use the attached BTActivationManager to InitBehavior, SetVariables, and Act. This causes the BehaviorTree to be evaluated and executed at each timestep, with results applied to the agent owning this Mind.


Member Function Documentation

override void RAIN.Minds.BehaviorTreeMind.Act ( Agent  agent,
float  deltaTime 
) [virtual]

Act causes the BehaviorTree to execute.

Parameters:
agentThe agent owning this Mind
deltaTimetimestep in seconds

Implements RAIN.Core.Mind.

override void RAIN.Minds.BehaviorTreeMind.Init ( Agent  agent) [virtual]

Init is called by the Agent upon startup. The Mind is initialized and the BehaviorTree is loaded.

Parameters:
agentThe agent owning this Mind

Implements RAIN.Core.Mind.

override void RAIN.Minds.BehaviorTreeMind.Think ( Agent  agent,
float  deltaTime 
) [virtual]

Think is a no-op for behavior trees.

Parameters:
agentThe agent owning this Mind
deltaTimetimestep in seconds

Implements RAIN.Core.Mind.


Member Data Documentation

An ActivationManager used to manage linkage between RAIN, BehaviorTrees, and Unity.

The file name of the xml file defining the behavior tree root.