Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 1906 was 1904, checked in by patrick, 21 years ago

blitz article

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