JNR
|
Abstract base class for AI agents. More...
#include <aiAgent.h>
Public Member Functions | |
void | activate (M_BOOL active=M_TRUE) |
M_BOOL | isActive () |
void | reset () |
void | controllers (aiController *pSelf, aiController *pPlayer, aiPercepts *pGlobalPercepts) |
void | add (std::string id, aiAgentState *pState) |
void | state (std::string id) |
std::string | state () |
void | perceive (unsigned id, aiPerceptData data=aiPerceptData()) |
M_BOOL | isPerceiving (unsigned id) |
void | perceptsClear () |
virtual void | execute (class laTimer *pt) |
virtual void | load (class laFileParser *fp) |
![]() | |
void | addNamedClass (laNamedClass *pc) |
Register a named class. | |
laNamedClass * | instantiate (std::string strClassName) |
Instantiate class by name. | |
Protected Attributes | |
M_BOOL | _bActive |
M_BOOL | _bInitialized |
aiPercepts | _percepts |
aiPercepts * | _perceptsGlobal |
aiController * | _self |
aiController * | _player |
std::map< std::string, aiAgentState * > | _vStates |
std::string | _strCurrentState |
aiAgentState * | _pCurrentState |
Abstract base class for AI agents.
This class provides the abstract percepts and controller infrastructure that can be used to implemnet AI agents for any element (e.g. Active Objects, special terrain Tiles, or Creatures)
Percept IDs used by various objects derrived form aiAgentState; Not every aiAgentState uses all of these states but in order to ensure there are no conflicts, every percept ID should be unique.