RAIN.Primitives.DetectAction Class Reference

DetectAction is a primitive that is used to detect an object with a certain aspect, then assign the object to a variable in the Agent's actionContext. More...

Inheritance diagram for RAIN.Primitives.DetectAction:
RAIN.Action.Action

List of all members.

Public Member Functions

override ActionResult Start (Agent agent, float deltaTime)
 ActionResult.Start.
override ActionResult Execute (Agent agent, float deltaTime)
 ActionResult.Execute Causes the agent to GainInterestIn() the aspect and then attempt to Sense it. If an object with the given aspect is sensed it is assigned to the assignTo variable in the actionContext.
override ActionResult Stop (Agent agent, float deltaTime)
 ActionResult.Stop.

Public Attributes

string aspect
 aspect is the Aspect we want to detect via any sensor
string assignTo
 assignTo is the name of a variable that the detected GameObject will be assigned to in the actionContext

Detailed Description

DetectAction is a primitive that is used to detect an object with a certain aspect, then assign the object to a variable in the Agent's actionContext.


Member Function Documentation

override ActionResult RAIN.Primitives.DetectAction.Execute ( Agent  agent,
float  deltaTime 
) [virtual]

ActionResult.Execute Causes the agent to GainInterestIn() the aspect and then attempt to Sense it. If an object with the given aspect is sensed it is assigned to the assignTo variable in the actionContext.

Parameters:
agent
deltaTime
Returns:
RUNNING if the aspect is not detected, SUCCESS if the aspect is detected and assigned

Reimplemented from RAIN.Action.Action.

override ActionResult RAIN.Primitives.DetectAction.Start ( Agent  agent,
float  deltaTime 
) [virtual]

ActionResult.Start.

Parameters:
agent
deltaTime
Returns:
FAILURE if no aspect or assignTo variable have been set, SUCCESS otherwise

Reimplemented from RAIN.Action.Action.

override ActionResult RAIN.Primitives.DetectAction.Stop ( Agent  agent,
float  deltaTime 
) [virtual]

ActionResult.Stop.

Parameters:
agent
deltaTime
Returns:
SUCCESS

Reimplemented from RAIN.Action.Action.


Member Data Documentation

aspect is the Aspect we want to detect via any sensor

assignTo is the name of a variable that the detected GameObject will be assigned to in the actionContext