Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/tags/0.1-pre-alpha-3/core/world.h @ 10365

Last change on this file since 10365 was 1994, checked in by dave, 20 years ago

orxonox/branches/dave:[test the Shit]

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