Deep RTS
Static Public Member Functions | List of all members
UnitManager Class Reference

#include <UnitManager.h>

Static Public Member Functions

static Unit constructUnit (Constants::Unit unitType, Player &player)
 
static void updateUnitCount (Player &p, Constants::Unit unitType, int n)
 
static Unit constructTownHall (Player &player)
 
static Unit constructPeasant (Player &player)
 
static Unit constructFarm (Player &player)
 
static Unit constructBarracks (Player &player)
 
static Unit constructFootman (Player &player)
 
static Unit constructArcher (Player &player)
 

Detailed Description

The unit manager is used to construct units in the game. The unit manager functions usually takes in a player object as reference, and returns a unit object which is added to the player API is due to change.

Member Function Documentation

◆ constructArcher()

Unit UnitManager::constructArcher ( Player player)
static

Create a archer unit for player

Parameters
playerplayer reference
Returns
Archer unit

◆ constructBarracks()

Unit UnitManager::constructBarracks ( Player player)
static

Construct a barracks unit for player

Parameters
playerplayer reference
Returns
Barracks unit

◆ constructFarm()

Unit UnitManager::constructFarm ( Player player)
static

Construct a farm unit for player

Parameters
playerplayer reference
Returns
Farm unit

◆ constructFootman()

Unit UnitManager::constructFootman ( Player player)
static

Construct a footman unit for player

Parameters
playerplayer reference
Returns
Footman Unit

◆ constructPeasant()

Unit UnitManager::constructPeasant ( Player player)
static

Construct a peasant unit for player

Parameters
playerplayer reference
Returns
Peasant unit

◆ constructTownHall()

Unit UnitManager::constructTownHall ( Player player)
static

Construct a town hall unit for player

Parameters
playerplayer reference
Returns
Town-Hall unit

◆ constructUnit()

Unit UnitManager::constructUnit ( Constants::Unit  unitType,
Player player 
)
static

Construct a unit of type unitType for Player object player

Parameters
unitTypeThe unit type
playerThe player
Returns
The newly constructed unit

◆ updateUnitCount()

void UnitManager::updateUnitCount ( Player p,
Constants::Unit  unitType,
int  n 
)
static

Update the unit count of a specified unit for player p

Parameters
pthe player reference
unitTypethe unit type
nthe count you wish to add.

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