Crystal AI  1.0.0
Crystal.DecisionMakerBase Class Referenceabstract

The decision maker, every agent will have one or more of these to execute different AIs. More...

Inheritance diagram for Crystal.DecisionMakerBase:
Crystal.IDecisionMaker Crystal.DecisionMaker

Classes

class  ContextProviderNullException
 
class  PotentialCircularDependencyException
 
class  UtilityAiNullException
 

Public Member Functions

void Start ()
 Starts the associated AI and sets the decision maker state to F:Crystal.DecisionMakerState.Running. More...
 
void Stop ()
 Stops the associated AI and sets the decision maker state to F:Crystal.DecisionMakerState.Stopped. More...
 
void Pause ()
 Pauses the associated AI and the decision maker state to F:Crystal.DecisionMakerState.Paused. More...
 
void Resume ()
 Resumes execution of the associated AI and sets the decision maker state to F:Crystal.DecisionMakerState.Running. More...
 
void Think ()
 Makes a decision on what should be the next action to be executed. More...
 
void Update ()
 Updates the action selected by Think() - that is if it needs updating, otherwise this will simply return. More...
 

Protected Member Functions

abstract void OnStart ()
 Called after M:Crystal.DecisionMakerBase.Start. More...
 
abstract void OnStop ()
 Called after M:Crystal.DecisionMakerBase.Stop. More...
 
abstract void OnPause ()
 Called after M:Crystal.DecisionMakerBase.Pause. More...
 
abstract void OnResume ()
 Called after M:Crystal.DecisionMakerBase.Resume. More...
 
 DecisionMakerBase (IUtilityAi ai, IContextProvider contextProvider)
 Initializes a new instance of the DecisionMakerBase class. More...
 

Properties

DecisionMakerState State [get, protected set]
 The state of the decision maker. More...
 
- Properties inherited from Crystal.IDecisionMaker
DecisionMakerState State [get]
 The state of the decision maker. More...
 

Detailed Description

The decision maker, every agent will have one or more of these to execute different AIs.

See also
T:Crystal.IDecisionMaker

Constructor & Destructor Documentation

Crystal.DecisionMakerBase.DecisionMakerBase ( IUtilityAi  ai,
IContextProvider  contextProvider 
)
inlineprotected

Initializes a new instance of the DecisionMakerBase class.

Parameters
aiThe ai.
contextProviderThe context provider.
Exceptions
Crystal.DecisionMakerBase.UtilityAiNullException
Crystal.DecisionMakerBase.ContextProviderNullException

Member Function Documentation

abstract void Crystal.DecisionMakerBase.OnPause ( )
protectedpure virtual

Called after M:Crystal.DecisionMakerBase.Pause.

Implemented in Crystal.DecisionMaker.

abstract void Crystal.DecisionMakerBase.OnResume ( )
protectedpure virtual

Called after M:Crystal.DecisionMakerBase.Resume.

Implemented in Crystal.DecisionMaker.

abstract void Crystal.DecisionMakerBase.OnStart ( )
protectedpure virtual

Called after M:Crystal.DecisionMakerBase.Start.

Implemented in Crystal.DecisionMaker.

abstract void Crystal.DecisionMakerBase.OnStop ( )
protectedpure virtual

Called after M:Crystal.DecisionMakerBase.Stop.

Implemented in Crystal.DecisionMaker.

void Crystal.DecisionMakerBase.Pause ( )
inline

Pauses the associated AI and the decision maker state to F:Crystal.DecisionMakerState.Paused.

Implements Crystal.IDecisionMaker.

void Crystal.DecisionMakerBase.Resume ( )
inline

Resumes execution of the associated AI and sets the decision maker state to F:Crystal.DecisionMakerState.Running.

Implements Crystal.IDecisionMaker.

void Crystal.DecisionMakerBase.Start ( )
inline

Starts the associated AI and sets the decision maker state to F:Crystal.DecisionMakerState.Running.

Implements Crystal.IDecisionMaker.

void Crystal.DecisionMakerBase.Stop ( )
inline

Stops the associated AI and sets the decision maker state to F:Crystal.DecisionMakerState.Stopped.

Implements Crystal.IDecisionMaker.

void Crystal.DecisionMakerBase.Think ( )
inline

Makes a decision on what should be the next action to be executed.

Implements Crystal.IDecisionMaker.

void Crystal.DecisionMakerBase.Update ( )
inline

Updates the action selected by Think() - that is if it needs updating, otherwise this will simply return.

Implements Crystal.IDecisionMaker.

Property Documentation

DecisionMakerState Crystal.DecisionMakerBase.State
getprotected set

The state of the decision maker.


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