Last change
on this file since 227baaa was 227baaa, checked in by dportnoy <dmp1488@…>, 12 years ago |
Fixed some syntax errors related to the player move method
|
-
Property mode
set to
100644
|
File size:
775 bytes
|
Line | |
---|
1 | #ifndef _PLAYER_H
|
---|
2 | #define _PLAYER_H
|
---|
3 |
|
---|
4 | #include "Compiler.h"
|
---|
5 |
|
---|
6 | #if defined WINDOWS
|
---|
7 | #include <winsock2.h>
|
---|
8 | #include <WS2tcpip.h>
|
---|
9 | #elif defined LINUX
|
---|
10 | #include <netinet/in.h>
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | #include <string>
|
---|
14 |
|
---|
15 | #include "Common.h"
|
---|
16 | #include "WorldMap.h"
|
---|
17 |
|
---|
18 | using namespace std;
|
---|
19 |
|
---|
20 | class Player {
|
---|
21 | public:
|
---|
22 | Player();
|
---|
23 | Player(const Player& p);
|
---|
24 | Player(string name, string password);
|
---|
25 | Player(string name, sockaddr_in addr); // this will be deleted
|
---|
26 |
|
---|
27 | ~Player();
|
---|
28 |
|
---|
29 | void serialize(char* buffer);
|
---|
30 | void deserialize(char* buffer);
|
---|
31 |
|
---|
32 | void setId(int id);
|
---|
33 | void setAddr(sockaddr_in addr);
|
---|
34 |
|
---|
35 | bool move(WorldMap *map);
|
---|
36 |
|
---|
37 | int id;
|
---|
38 | string name;
|
---|
39 | string password;
|
---|
40 | sockaddr_in addr;
|
---|
41 | FLOAT_POSITION pos;
|
---|
42 | POSITION target;
|
---|
43 | unsigned long long timeLastUpdated;
|
---|
44 | };
|
---|
45 |
|
---|
46 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.