Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals   Related Pages  

CBot Class Reference

Class to store all bots information. More...

#include <bot.h>

Inheritance diagram for CBot:

CBotInfo CVisibleBotInfo CMovingGameObj CGameObj

Public Member Functions

 CBot (const char *aDllName)
 Constructor.

void spawn (const char **aTileMap, const CGameObj *aGameObjects)
 Reloads AI from dll, creates and initializes new bot.

void think (const char **aTileMap, CVisibleBotInfo *aBots, list< CBulletInfo * > *aBulletList, list< CWeaponInfo * > *aWeaponList, list< TPosition > *aVoices)
 Updates visible objects and bots actions using CBotAI.

void performActions (list< CWeaponInfo * > *aBulletList, list< TPosition > *aVoices)
 Does error checking and performs valid actions.

void chkCollision (const char **aTileMap, CBotInfo **aBots)
 Checks and handles collisions.

void update (float aTimeFactor)
 Moves bot and prepares it for drawing.


Detailed Description

Class to store all bots information.

Bots are controlled using CBotAI. AI is always reloaded during spawning.


Constructor & Destructor Documentation

CBot::CBot const char *    aDllName
 

Constructor.

Parameters:
aDllName Name of the .dll file to load CBotAI.


Member Function Documentation

void CBot::chkCollision const char **    aTileMap,
CBotInfo **    aBots
 

Checks and handles collisions.

See CMovingGameObj::chkCollision().

Parameters:
aTileMap Tilemap to detect collisions. Bots can collide with walls and obstacles.
aBots List of all bots.

void CBot::performActions list< CWeaponInfo * > *    aBulletList,
list< TPosition > *    aVoices
 

Does error checking and performs valid actions.

Parameters:
aBulletList List to add new bullets in case of EActionShoot.
aVoices List to add new sound sources in case of EActionShoot.

void CBot::spawn const char **    aTileMap,
const CGameObj   aGameObjects
 

Reloads AI from dll, creates and initializes new bot.

Parameters:
aTileMap Tilemap for locating new bot.
aGameObjects Bot should not be located near these objects.

void CBot::think const char **    aTileMap,
CVisibleBotInfo   aBots,
list< CBulletInfo * > *    aBulletList,
list< CWeaponInfo * > *    aWeaponList,
list< TPosition > *    aVoices
 

Updates visible objects and bots actions using CBotAI.

Parameters:
aTileMap The whole tilemap.
aBots Array containing all bots.
aBulletList List of all bullets in the field.
aWeaponList List of all weapons in the field.
aVoices List of all voice sources.

void CBot::update float    aTimeFactor
 

Moves bot and prepares it for drawing.

Parameters:
aTimeFactor Elapsed time between 0 and 1.


The documentation for this class was generated from the following file:
Generated on Mon Jun 9 22:02:25 2003 for Drunken Bot III by doxygen1.3-rc3