Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/core/world.h @ 1896

Last change on this file since 1896 was 1896, checked in by patrick, 20 years ago

orxonox/trunk: added ability to shoot. so check out the new release and shoot the fuck up

File size: 1.3 KB
Line 
1
2
3
4#ifndef WORLD_H
5#define WORLD_H
6
7#include <stdlib.h>
8
9#include "npc.h"
10#include "player.h"
11#include "environment.h"
12#include "shoot_laser.h"
13#include "stdincl.h"
14
15class World {
16
17 public:
18  World ();
19  ~World ();
20
21  /* for easier use: map the first two player here */
22  Player *localPlayer;
23  Player *player1;
24  Player *player2;
25
26  /* a list of all players */
27  struct playerList {
28    playerList* next;
29    Player* player;
30    int number;
31  };
32  playerList* lastPlayer;
33
34  /* a list of all non-player-characters */
35  struct npcList {
36    npcList* next;
37    NPC* npc;
38    int number;
39  };
40  npcList* lastNPC;
41
42  /* a list of all environmental objects */
43  struct envList {
44    envList* next;
45    Environment* env;
46    int number;
47  };
48  envList* lastEnv;
49
50  /* a list of all shoot-amental objects */
51  struct shootList {
52    shootList* next;
53    ShootLaser* shoot;
54    int number;
55  };
56  shootList* lastShoot;
57
58
59  bool addPlayer(Player* player);
60  bool removePlayer(Player* player);
61  Player* getLocalPlayer();
62  bool addNPC(NPC* npc);
63  bool removeNPC(NPC* npc);
64  bool addEnv(Environment* env);
65  bool addShoot(ShootLaser* shoot);
66
67  void drawWorld(void);
68  void initEnvironement(void);
69  void updateWorld(void);
70  void testThaTest(void);
71
72 private:
73  float surface[120][120];
74
75
76};
77
78#endif
Note: See TracBrowser for help on using the repository browser.