Changeset 9ba9b96 in network-game for common/Projectile.h
- Timestamp:
- Jan 20, 2014, 4:59:34 PM (11 years ago)
- Branches:
- master
- Children:
- 949cf70
- Parents:
- d998572
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Projectile.h
rd998572 r9ba9b96 13 13 class Projectile { 14 14 public: 15 unsigned int id; 16 POSITION pos; 17 unsigned int target; 18 int speed; 19 int damage; 20 unsigned long long timeLastUpdated; 15 21 16 22 Projectile(); … … 20 26 ~Projectile(); 21 27 22 void setId( int id);28 void setId(unsigned int id); 23 29 24 30 void serialize(char* buffer); 25 31 void deserialize(char* buffer); 26 32 27 // returns true if itreached the target and should be deleted33 // returns true if the projectile reached the target and should be deleted 28 34 bool move(map<unsigned int, Player*>& mapPlayers); 29 30 /*31 * target should become a Player*. When this object gets serialized, the player's id should be sent.32 * Deserialization in this case might be tricky since it will require a playerMap to turn the id into a Plauyer*33 */34 35 int id;36 POSITION pos;37 int target;38 int speed;39 int damage;40 unsigned long long timeLastUpdated;41 35 }; 42 36
Note:
See TracChangeset
for help on using the changeset viewer.