Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: ground moves

File size: 1.2 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#include "data_tank.h"
16
17class World {
18
19 public:
20  World ();
21  ~World ();
22
23  float primitiveMove;
24
25  /* for easier use: map the first two player here */
26  Player *localPlayer;
27  Player *player1;
28  Player *player2;
29
30  /* a list of all players */
31  struct playerList {
32    playerList* next;
33    Player* player;
34    int number;
35  };
36  playerList* lastPlayer;
37
38  /* a list of all non-player-characters */
39  struct npcList {
40    npcList* next;
41    NPC* npc;
42    int number;
43  };
44  npcList* lastNPC;
45
46  /* a list of all environmental objects */
47  struct envList {
48    envList* next;
49    Environment* env;
50    int number;
51  };
52  envList* lastEnv;
53
54
55
56
57  bool addPlayer(Player* player);
58  bool removePlayer(Player* player);
59  Player* getLocalPlayer();
60  bool addNPC(NPC* npc);
61  bool removeNPC(NPC* npc);
62  bool addEnv(Environment* env);
63
64  void drawWorld(void);
65  void initEnvironement(void);
66  void updateWorld(void);
67  void detectCollision(void);
68  void testThaTest(void);
69
70 private:
71  float surface[120][120];
72
73
74};
75
76#endif
Note: See TracBrowser for help on using the repository browser.