PVLETeam Class Reference

Base class for a team, that is to say a group of (humans or CPU) players. More...

#include <PVLETeam.h>

List of all members.

Public Member Functions

void addPlayer (PVLEPlayer *pPlayer)
void removePlayer (PVLEPlayer *pPlayer)
PVLEPlayergetPlayer (UINT index)
const PVLEPlayergetPlayer (UINT index) const
UINT getNbPlayers ()

Protected Member Functions

virtual ~PVLETeam ()
 Protected destructor forces the object to be deleted by being dereferenced.

Protected Attributes

std::vector< osg::ref_ptr
< PVLEPlayer > > 
vPlayersList
PVLEGamepGame

Friends

class PVLEPlayer
class PVLEGame


Detailed Description

Base class for a team, that is to say a group of (humans or CPU) players.

The team is usually needed to group allied players in order to apply 'friendly fire' when needed ; but actually, a non team-based game can be created by putting all players in the same team with the 'friendly fire' value to 1.

Definition at line 38 of file PVLETeam.h.


Constructor & Destructor Documentation

virtual PVLETeam::~PVLETeam (  )  [inline, protected, virtual]

Protected destructor forces the object to be deleted by being dereferenced.

Also avoids the object from beeing created on the stack.

Definition at line 55 of file PVLETeam.h.


Member Function Documentation

void PVLETeam::addPlayer ( PVLEPlayer pPlayer  )  [inline]

Definition at line 40 of file PVLETeam.h.

References PVLEPlayer::setTeam().

UINT PVLETeam::getNbPlayers (  )  [inline]

Definition at line 44 of file PVLETeam.h.

const PVLEPlayer* PVLETeam::getPlayer ( UINT  index  )  const [inline]

Definition at line 43 of file PVLETeam.h.

PVLEPlayer* PVLETeam::getPlayer ( UINT  index  )  [inline]

Definition at line 42 of file PVLETeam.h.

void PVLETeam::removePlayer ( PVLEPlayer pPlayer  ) 

Definition at line 30 of file PVLETeam.cpp.

References PVLEPlayer::setTeam(), and vPlayersList.


Friends And Related Function Documentation

friend class PVLEGame [friend]

Definition at line 50 of file PVLETeam.h.

friend class PVLEPlayer [friend]

Definition at line 47 of file PVLETeam.h.


Member Data Documentation

PVLEGame* PVLETeam::pGame [protected]

Definition at line 51 of file PVLETeam.h.

Referenced by PVLEGame::addTeam().

std::vector<osg::ref_ptr<PVLEPlayer> > PVLETeam::vPlayersList [protected]

Definition at line 48 of file PVLETeam.h.

Referenced by removePlayer().


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

Generated on Sun Jan 17 11:39:29 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9