Crystal AI  1.0.0
Crystal.IUtilityAi Interface Reference

Interface for all utility based AIs. More...

Inheritance diagram for Crystal.IUtilityAi:
Crystal.IAiPrototype< IUtilityAi > Crystal.UtilityAi

Public Member Functions

bool AddBehaviour (string behaviourId)
 Adds the behaviour. More...
 
bool RemoveBehaviour (string behaviourId)
 Removes the behaviour. More...
 
IAction Select (IContext context)
 Enters a selection process that selects one of the contained behaviours. This in turn selects one option within the selected behaviour and returns the action associated with that option. More...
 
- Public Member Functions inherited from Crystal.IAiPrototype< IUtilityAi >
Clone ()
 Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state! More...
 

Properties

string NameId [get]
 A unique name identifier for this AI. More...
 
ISelector Selector [get, set]
 Returns the selector associated with this AI. Also see T:Crystal.ISelector. More...
 

Detailed Description

Interface for all utility based AIs.

See also
T:Crystal.IAiPrototype`1

Member Function Documentation

bool Crystal.IUtilityAi.AddBehaviour ( string  behaviourId)

Adds the behaviour.

Parameters
behaviourIdThe behaviour identifier.
Returns
Returns true if the requested behaviour was added to the AI, false otherwise.

Implemented in Crystal.UtilityAi.

bool Crystal.IUtilityAi.RemoveBehaviour ( string  behaviourId)

Removes the behaviour.

Parameters
behaviourIdThe behaviour identifier.
Returns
Returns true if the behaviour was removed from the AI, false otherwise.

Implemented in Crystal.UtilityAi.

IAction Crystal.IUtilityAi.Select ( IContext  context)

Enters a selection process that selects one of the contained behaviours. This in turn selects one option within the selected behaviour and returns the action associated with that option.

Parameters
contextThe context.
Returns
The action associated with the selected option.

Implemented in Crystal.UtilityAi.

Property Documentation

string Crystal.IUtilityAi.NameId
get

A unique name identifier for this AI.

ISelector Crystal.IUtilityAi.Selector
getset

Returns the selector associated with this AI. Also see T:Crystal.ISelector.


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