Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Player Class Reference

#include <Player.h>

Collaboration diagram for Player:

Collaboration graph
[legend]
List of all members.

Public Methods

 Player (Vec3D teamColor, int startingFunds, vector< MilitaryUnit * > &units, vector< City * > &cities)
void update ()
 Updates during each game tick.

Bankbank ()
 Gets the money manager for this player.

const Vec3Dcolor ()
 Returns the team color of this player.


Private Attributes

vector< City * > & m_cities
vector< MilitaryUnit * > & m_units
Vec3D m_color
Bank m_bank
DWORD m_timeOfLastDeposit

Constructor & Destructor Documentation

Player::Player Vec3D    teamColor,
int    startingFunds,
vector< MilitaryUnit * > &    units,
vector< City * > &    cities
 

Definition at line 27 of file Player.cpp.

References Overhead::cities, and Overhead::units.

00027                                                                                                   :
00028       m_color(color),
00029       m_bank(startingFunds),
00030       m_units(units),
00031       m_cities(cities),
00032       m_timeOfLastDeposit(0) {}


Member Function Documentation

Bank & Player::bank  
 

Gets the money manager for this player.

Definition at line 38 of file Player.cpp.

References m_bank.

Referenced by Overhead::overhead_update(), Overhead::playerStrength(), Overhead::processCommand(), NetworkSubsystem::processNetworkData(), HUD::render(), City::trainUnit(), City::update(), and City::upgradeEcon().

00038 { return m_bank; }

const Vec3D & Player::color  
 

Returns the team color of this player.

Definition at line 40 of file Player.cpp.

References m_color, and Vec3D.

Referenced by Overhead::amIInThisBattle(), City::changeOwner(), Overhead::doCollisionDetection(), Overhead::doVictoryTest(), BattleGroup::fire(), BattleEntry::initBattle(), Overhead::overhead_update(), Overhead::playerStrength(), HUD::processMiniMapInput(), Overhead::processOverheadInput(), HUD::processOverheadInput(), HUD::render(), HUD::renderMiniMap(), HUD::switchToNextBattle(), HUD::switchToPrevBattle(), City::trainUnit(), and City::update().

00040 { return m_color; } 

void Player::update  
 

Updates during each game tick.

Definition at line 34 of file Player.cpp.

00035 {
00036 }


Member Data Documentation

Bank Player::m_bank [private]
 

Definition at line 46 of file Player.h.

Referenced by bank().

vector<City*>& Player::m_cities [private]
 

Definition at line 42 of file Player.h.

Vec3D Player::m_color [private]
 

Definition at line 44 of file Player.h.

Referenced by color().

DWORD Player::m_timeOfLastDeposit [private]
 

:

Definition at line 48 of file Player.h.

vector<MilitaryUnit*>& Player::m_units [private]
 

Definition at line 43 of file Player.h.


The documentation for this class was generated from the following files:
Generated on Wed Apr 23 05:52:12 2003 for Modern Warfare by doxygen1.3-rc2