#include <playerbase.h>
Inheritance diagram for PlayerBase:

Public Methods | |
| PlayerBase (unsigned id, string nm, char race, char color, int x=0, int y=0) | |
| PlayerBase (const PlayerBase &p) | |
| PlayerBase () | |
| virtual | ~PlayerBase () |
| PlayerBase & | operator= (const PlayerBase &p) |
| unsigned | getIndex () const |
| char | getRace () const |
| char | getColor () const |
| int | getPosX () const |
| int | getPosY () const |
| int | getTileX () const |
| int | getTileY () const |
| int | getResource (Resource r) const |
| int | getVelocity () const |
| int | getBaseVelocity () const |
| int | getDirX () const |
| int | getDirY () const |
| bool | isMoving () const |
| bool | isAlive () const |
| unsigned | getCardinalDirection () const |
| const string & | getName () const |
| virtual string | getProperties () const |
| Returns a string containing all the information about the player. | |
| void | setIndex (unsigned i) |
| void | setAlive (bool lives) |
| void | setRace (char c) |
| void | setColor (char c) |
| void | setPosX (int x) |
| void | setPosY (int y) |
| void | setPos (int x, int y) |
| void | setDirX (int x) |
| void | setDirY (int y) |
| void | setResource (Resource r, int a) |
| void | setName (const string &n) |
| void | stop () |
| void | setCardinalDirection (unsigned direction) |
| void | setVelocity (int v) |
| virtual void | setProperties (const string &properties) |
| Updates the player's properties. More... | |
| void | print () const |
| Prints the player information. More... | |
Protected Attributes | |
| int | index |
| string | name |
| char | race |
| char | color |
| int | posx |
| int | posy |
| int | dirx |
| int | diry |
| int | baseVelocity |
| int | velocity |
| int | resources [NUMRESOURCES] |
| bool | alive |
Base class for all the kinds of player in the game, both in the server and the client
|
|
Prints the player information. Useful for debugging issues. |
|
|
Updates the player's properties. Takes a string containing a specification of a player's properties, and updates itself with them.
|
1.2.15