Last change
on this file since 02fa8fd was d03ec0f, checked in by dportnoy <dmp1488@…>, 11 years ago |
Add the Projectile class
|
-
Property mode
set to
100644
|
File size:
678 bytes
|
Line | |
---|
1 | #ifndef _PROJECTILE_H
|
---|
2 | #define _PROJECTILE_H
|
---|
3 |
|
---|
4 | #include "Compiler.h"
|
---|
5 |
|
---|
6 | #include <string>
|
---|
7 | #include <map>
|
---|
8 |
|
---|
9 | #include "Common.h"
|
---|
10 | #include "WorldMap.h"
|
---|
11 | #include "Player.h"
|
---|
12 |
|
---|
13 | using namespace std;
|
---|
14 |
|
---|
15 | class Projectile {
|
---|
16 | public:
|
---|
17 |
|
---|
18 | Projectile();
|
---|
19 | Projectile(const Projectile& p);
|
---|
20 | Projectile(int x, int y, int targetId, int damage);
|
---|
21 |
|
---|
22 | ~Projectile();
|
---|
23 |
|
---|
24 | void setId(int id);
|
---|
25 |
|
---|
26 | void serialize(char* buffer);
|
---|
27 | void deserialize(char* buffer);
|
---|
28 |
|
---|
29 | // returns true if it reached the target and should be deleted
|
---|
30 | bool move(map<unsigned int, Player>& mapPlayers);
|
---|
31 |
|
---|
32 | int id;
|
---|
33 | POSITION pos;
|
---|
34 | int target;
|
---|
35 | int speed;
|
---|
36 | int damage;
|
---|
37 | unsigned long long timeLastUpdated;
|
---|
38 | };
|
---|
39 |
|
---|
40 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.