Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
gameplay.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include "gamestate/gamestate.h"
6 
7 
8 class BaseScenario;
9 class Game;
10 class GamePlayRunning;
11 class GamePlayPaused;
12 class GamePlayScene;
13 class Player;
14 class SoundManager;
15 
20 class GamePlay: public GameState {
21 public:
22  GamePlay(Game* game);
23 
24  Game* game();
25 
26  GamePlayScene& scene();
27 
28  GamePlayRunning& running();
29  GamePlayPaused& paused();
30 
31  virtual const Scene& scene() const override;
32  virtual const CameraHead& cameraHead() const override;
33 
34  SoundManager& soundManager();
35 
36  void loadScenario(int i);
37 
38  virtual void update(float deltaSec) override;
39 
40  virtual void onEntered() override;
41  virtual void onLeft() override;
42 
43 
44 protected:
45  Game* m_game;
46 
47  std::unique_ptr<GamePlayScene> m_scene;
48  std::unique_ptr<BaseScenario> m_scenario;
49  std::shared_ptr<SoundManager> m_soundManager;
50 
51  GamePlayRunning* m_runningState;
52  GamePlayPaused* m_pausedState;
53 };
54 
Definition: camerahead.h:12
virtual void update(float deltaSec) override
Definition: gameplay.cpp:100
Definition: soundmanager.h:19
Definition: gamestate.h:20
virtual void onLeft() override
Definition: gameplay.cpp:111
Definition: scene.h:14
Definition: gameplayscene.h:23
virtual void onEntered() override
Definition: gameplay.cpp:105
Definition: gameplayrunning.h:13
Definition: game.h:16
Definition: player.h:22
Definition: basescenario.h:6
Definition: gameplay.h:20
Definition: gameplaypaused.h:10