equal
deleted
inserted
replaced
23 virtual void on_player_left (Player *p) = 0; |
23 virtual void on_player_left (Player *p) = 0; |
24 }; |
24 }; |
25 |
25 |
26 class GameState { |
26 class GameState { |
27 public: |
27 public: |
|
28 /** |
|
29 * All active players |
|
30 */ |
28 std::list<Player*> player_list; |
31 std::list<Player*> player_list; |
|
32 |
|
33 /** |
|
34 * All active projectiles |
|
35 */ |
29 std::list<Projectile*> projectiles; |
36 std::list<Projectile*> projectiles; |
|
37 |
|
38 /** |
|
39 * Our world simulation |
|
40 */ |
30 PhysicsWorld world; |
41 PhysicsWorld world; |
|
42 |
|
43 /** |
|
44 * Our terrain |
|
45 */ |
|
46 Terrain &terrain; |
31 |
47 |
32 /** |
48 /** |
33 * The one LocalPlayer that *we* control |
49 * The one LocalPlayer that *we* control |
34 */ |
50 */ |
35 LocalPlayer *local_player; |
51 LocalPlayer *local_player; |
40 */ |
56 */ |
41 GameStateEventHandler *event_handler; |
57 GameStateEventHandler *event_handler; |
42 |
58 |
43 public: |
59 public: |
44 /** |
60 /** |
45 * ... |
61 * Create the game world, using the given terrain |
46 * |
62 * |
47 * This should take some arguments |
63 * @param terrain the world's terrain |
48 */ |
64 */ |
49 GameState (void); |
65 GameState (Terrain &terrain); |
50 |
66 |
51 /** |
67 /** |
52 * Set event handler, only one can be set |
68 * Set event handler, only one can be set |
53 */ |
69 */ |
54 void setEventHandler (GameStateEventHandler *handler); |
70 void setEventHandler (GameStateEventHandler *handler); |