#include <player.h>
Collaboration diagram for Player:

Public Member Functions | |
| Player () | |
| ~Player () | |
| std::string & | getName () |
| Returns the name of player. | |
| void | setName (const std::string &name) |
| Tank * | getTank () |
| Return players tank. | |
| int | getKills () const |
| void | killsUP () |
| int | getID () const |
| Return id of player. | |
| void | setID (int newID) |
| Set players ID. | |
Private Attributes | |
| int | mID |
| Players uniq ID. -1 means invalid ID. | |
| std::string | mName |
| Player's name. | |
| int | mKills |
| Number of killed enemies. | |
| int | mDeaths |
| How much times the player was killed. | |
| Tank * | mTank |
| The tank controlled by Player. May be NULL. | |
| int | mPing |
| Player's network response time in miliseconds. | |
Definition at line 14 of file player.h.
|
|
Definition at line 6 of file player.cpp. |
|
|
Definition at line 12 of file player.cpp. |
|
|
Return id of player. The id corresponds to id in Game
Definition at line 40 of file player.cpp. References mID. Referenced by CommanderClient::command_players(). |
|
|
Definition at line 30 of file player.cpp. References mKills. |
|
|
Returns the name of player.
Definition at line 18 of file player.cpp. References mName. |
|
|
Return players tank. Every player may have tank. But the player may also be without it. So check return value for 0.
Definition at line 34 of file player.h. References mTank. |
|
|
Definition at line 35 of file player.cpp. References mKills. |
|
|
Set players ID. This function should be called only from Game since the ID must correspond to ID in Game. So DON'T call this if you aren't unsure.
Definition at line 45 of file player.cpp. References mID. |
|
|
Definition at line 24 of file player.cpp. References mName. Referenced by TaskSimulationServer::tick(). |
|
|
How much times the player was killed.
|
|
|
Players uniq ID. -1 means invalid ID.
|
|
|
Number of killed enemies.
Definition at line 65 of file player.h. Referenced by getKills(), killsUP(), and Player(). |
|
|
Player's name.
|
|
|
Player's network response time in miliseconds.
|
|
|
The tank controlled by Player. May be NULL.
Definition at line 68 of file player.h. Referenced by getTank(). |
1.4.5