source: network-game/common/Projectile.h@ e708305

Last change on this file since e708305 was 9ba9b96, checked in by dportnoy <dmp1488@…>, 11 years ago

All ids should now be unsigned ints

  • Property mode set to 100644
File size: 694 bytes
RevLine 
[d03ec0f]1#ifndef _PROJECTILE_H
2#define _PROJECTILE_H
3
4#include <string>
5#include <map>
6
7#include "Common.h"
8#include "WorldMap.h"
9#include "Player.h"
10
11using namespace std;
12
13class Projectile {
14public:
[9ba9b96]15 unsigned int id;
16 POSITION pos;
17 unsigned int target;
18 int speed;
19 int damage;
20 unsigned long long timeLastUpdated;
[d03ec0f]21
22 Projectile();
23 Projectile(const Projectile& p);
24 Projectile(int x, int y, int targetId, int damage);
25
26 ~Projectile();
27
[9ba9b96]28 void setId(unsigned int id);
[d03ec0f]29
30 void serialize(char* buffer);
31 void deserialize(char* buffer);
32
[9ba9b96]33 // returns true if the projectile reached the target and should be deleted
[e6c26b8]34 bool move(map<unsigned int, Player*>& mapPlayers);
[d03ec0f]35};
36
37#endif
Note: See TracBrowser for help on using the repository browser.