Public Member Functions
RAIN.Core.AIBehavior Class Reference

AIBehavior is the base class for most AI scripting. AIBehavior replaces MonoBehavior and uses a modified Start/Update system to support the AI thinking pipeline. AIBehavior is typically managed by the Mind associated with an AI, which controls the timing and activation of the AIBehavior code. The contents of the InitBehavior and Act methods are up to the developer, but typically contain AI specific code that utilizes other supporting RAIN functions such as Steering, Pathfinding, Sensors, etc. More...

Inheritance diagram for RAIN.Core.AIBehavior:
RAIN.Core.RAINComponent RAIN.BehaviorTrees.BTActivationManager

List of all members.

Public Member Functions

virtual void InitBehavior (Agent actor)
 InitBehavior replaces MonoBehavior.Start() and is used for script initialization. Timing of InitBehavior is controlled by the Mind, but typically occurs before the first Act() call.
abstract bool Act (Agent actor, float deltaTime)
 Act replaces MonoBehavior.Update() and is used for per-frame behavior generation. Timing of Act is controlled by the Mind, but typically occurs during the LateUpdate() step per frame.

Detailed Description

AIBehavior is the base class for most AI scripting. AIBehavior replaces MonoBehavior and uses a modified Start/Update system to support the AI thinking pipeline. AIBehavior is typically managed by the Mind associated with an AI, which controls the timing and activation of the AIBehavior code. The contents of the InitBehavior and Act methods are up to the developer, but typically contain AI specific code that utilizes other supporting RAIN functions such as Steering, Pathfinding, Sensors, etc.


Member Function Documentation

abstract bool RAIN.Core.AIBehavior.Act ( Agent  actor,
float  deltaTime 
) [pure virtual]

Act replaces MonoBehavior.Update() and is used for per-frame behavior generation. Timing of Act is controlled by the Mind, but typically occurs during the LateUpdate() step per frame.

Parameters:
actorThe AI Agent this script is producing Behavior for
deltaTimetimestep in seconds
Returns:
return true if the Act step performs successfully, false if an error or problem occurred

Implemented in RAIN.BehaviorTrees.BTActivationManager.

virtual void RAIN.Core.AIBehavior.InitBehavior ( Agent  actor) [virtual]

InitBehavior replaces MonoBehavior.Start() and is used for script initialization. Timing of InitBehavior is controlled by the Mind, but typically occurs before the first Act() call.

Parameters:
actorThe AI Agent this script is producing Behavior for