![]() |
Deep RTS
|
#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) |
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.
Create a archer unit for player
| player | player reference |
Construct a barracks unit for player
| player | player reference |
Construct a farm unit for player
| player | player reference |
Construct a peasant unit for player
| player | player reference |
Construct a town hall unit for player
| player | player reference |
|
static |
Construct a unit of type unitType for Player object player
| unitType | The unit type |
| player | The player |
|
static |
Update the unit count of a specified unit for player p
| p | the player reference |
| unitType | the unit type |
| n | the count you wish to add. |