Last change
on this file since 1899 was
1899,
checked in by patrick, 20 years ago
|
trunk/orxonox: collision detection implemented: simple spheres. all debug informations still print out to console. one enemy added, no AI, no move, waits to be killed. No kill signal implemented yet: look debug infos on console.
|
File size:
1.1 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | |
---|
4 | #ifndef WORLD_H |
---|
5 | #define WORLD_H |
---|
6 | |
---|
7 | #include <stdlib.h> |
---|
8 | #include <cmath> |
---|
9 | |
---|
10 | #include "npc.h" |
---|
11 | #include "player.h" |
---|
12 | #include "environment.h" |
---|
13 | #include "shoot_laser.h" |
---|
14 | #include "stdincl.h" |
---|
15 | |
---|
16 | class World { |
---|
17 | |
---|
18 | public: |
---|
19 | World (); |
---|
20 | ~World (); |
---|
21 | |
---|
22 | /* for easier use: map the first two player here */ |
---|
23 | Player *localPlayer; |
---|
24 | Player *player1; |
---|
25 | Player *player2; |
---|
26 | |
---|
27 | /* a list of all players */ |
---|
28 | struct playerList { |
---|
29 | playerList* next; |
---|
30 | Player* player; |
---|
31 | int number; |
---|
32 | }; |
---|
33 | playerList* lastPlayer; |
---|
34 | |
---|
35 | /* a list of all non-player-characters */ |
---|
36 | struct npcList { |
---|
37 | npcList* next; |
---|
38 | NPC* npc; |
---|
39 | int number; |
---|
40 | }; |
---|
41 | npcList* lastNPC; |
---|
42 | |
---|
43 | /* a list of all environmental objects */ |
---|
44 | struct envList { |
---|
45 | envList* next; |
---|
46 | Environment* env; |
---|
47 | int number; |
---|
48 | }; |
---|
49 | envList* lastEnv; |
---|
50 | |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | bool addPlayer(Player* player); |
---|
55 | bool removePlayer(Player* player); |
---|
56 | Player* getLocalPlayer(); |
---|
57 | bool addNPC(NPC* npc); |
---|
58 | bool removeNPC(NPC* npc); |
---|
59 | bool addEnv(Environment* env); |
---|
60 | |
---|
61 | void drawWorld(void); |
---|
62 | void initEnvironement(void); |
---|
63 | void updateWorld(void); |
---|
64 | void detectCollision(void); |
---|
65 | void testThaTest(void); |
---|
66 | |
---|
67 | private: |
---|
68 | float surface[120][120]; |
---|
69 | |
---|
70 | |
---|
71 | }; |
---|
72 | |
---|
73 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.