Last change
on this file since 373089e was 6319311, checked in by Dmitry Portnoy <dportnoy@…>, 11 years ago |
Some redfinition issues related to winsock2 are fixed and a few allegro rendering functions are now in GameRender
|
-
Property mode
set to
100644
|
File size:
655 bytes
|
Line | |
---|
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 |
|
---|
11 | using namespace std;
|
---|
12 |
|
---|
13 | class Projectile {
|
---|
14 | public:
|
---|
15 |
|
---|
16 | Projectile();
|
---|
17 | Projectile(const Projectile& p);
|
---|
18 | Projectile(int x, int y, int targetId, int damage);
|
---|
19 |
|
---|
20 | ~Projectile();
|
---|
21 |
|
---|
22 | void setId(int id);
|
---|
23 |
|
---|
24 | void serialize(char* buffer);
|
---|
25 | void deserialize(char* buffer);
|
---|
26 |
|
---|
27 | // returns true if it reached the target and should be deleted
|
---|
28 | bool move(map<unsigned int, Player>& mapPlayers);
|
---|
29 |
|
---|
30 | int id;
|
---|
31 | POSITION pos;
|
---|
32 | int target;
|
---|
33 | int speed;
|
---|
34 | int damage;
|
---|
35 | unsigned long long timeLastUpdated;
|
---|
36 | };
|
---|
37 |
|
---|
38 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.