#include <player.h>
Public Methods | |
Player (Game *pgame, int myplayernum) | |
~Player () | |
void | renderUnits () |
void | unitAction (int actionnum, Vector destpos) |
void | primaryUnitAction (Vector destpos) |
void | unitStep () |
void | selectUnits (Vector &sel1, Vector &sel2) |
enum AllianceModes | getPlayerAllianceMode (int player) |
void | setPlayerAllianceMode (int player, enum AllianceModes mode) |
Public Attributes | |
Unit * | units [MAX_UNITS] |
enum AllianceModes | alliancemodes [MAX_PLAYERS] |
Private Methods | |
int | findFreeUnit () |
Private Attributes | |
int | playerNum |
Renderer * | renderer |
Ground * | ground |
Game * | game |
friend | Unit |
friend | UnitMarine |
friend | UnitCommandCenter |
|
|
|
|
|
Find a unused unit slot. Returns empty slot number or -1 if no slots left. Note: it's extremely important to check if return value is -1 because amount of units is quite limited.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|