aiAgent Class Reference

Abstract base class for AI agents. More...

#include <aiAgent.h>

Inheritance diagram for aiAgent:
laLoadableObj laClassFactory

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)
- Public Member Functions inherited from laClassFactory
void addNamedClass (laNamedClass *pc)
 Register a named class.
laNamedClassinstantiate (std::string strClassName)
 Instantiate class by name.

Protected Attributes

M_BOOL _bActive
M_BOOL _bInitialized
aiPercepts _percepts
aiPercepts * _perceptsGlobal
std::map< std::string, aiAgentState * > _vStates
std::string _strCurrentState

Detailed Description

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.

Copyright (C) 2007-2013 Atanas Laskov, latan.nosp@m.as@g.nosp@m.mail..nosp@m.com

Definition at line 59 of file aiAgent.h.

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