Changeset 5b92307 in network-game for common/Player.h
- Timestamp:
- Jan 20, 2014, 6:47:58 PM (11 years ago)
- Branches:
- master
- Children:
- 204edcf
- Parents:
- 949cf70
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Player.h
r949cf70 r5b92307 21 21 22 22 class Player { 23 private: 24 unsigned int id; 25 unsigned int targetPlayer; 26 23 27 public: 24 28 … … 41 45 ~Player(); 42 46 47 unsigned int getId(); 48 unsigned int getTargetPlayer(); 49 43 50 void setId(unsigned int id); 51 void setTargetPlayer(unsigned int id); 44 52 void setAddr(sockaddr_in addr); 45 53 void setClass(PlayerClass c); … … 48 56 void deserialize(char* buffer); 49 57 50 bool updateTarget( const Player* targetPlayer);58 bool updateTarget(map<unsigned int, Player*>& players); 51 59 bool move(WorldMap *map); 52 60 void takeDamage(int damage); … … 55 63 void dropFlag(unsigned int flag, WorldMap* map); 56 64 57 unsigned int id;58 65 string name; 59 66 string password; … … 66 73 bool isChasing; 67 74 bool isAttacking; 68 unsigned int targetPlayer;69 75 bool isDead; 70 76
Note:
See TracChangeset
for help on using the changeset viewer.