blob: b45dfb691420fb27d513c1be2416f1b093315be2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#ifndef GameView_h
#define GameView_h
#include <QGraphicsView>
#include <QList>
#include <QTimer>
class ActionScene;
class GameScene;
class SceneChanger;
class GameView : public QGraphicsView
{
Q_OBJECT
public:
static GameView *instance();
GameScene *getScene(const QString &);
GameScene *getCurrentScene();
ActionScene* getActionScene();
signals:
public slots:
void gameOver();
void showMenuScene();
void showLevelSelectionScene();
void showCreditsScene();
void showActionScene();
void changeScene(GameScene* );
void showScene(GameScene *);
void showScene(const QString &);
private slots:
//! Calls GameScene::updateLogic of the current scene
void updateSceneLogic();
private:
explicit GameView(QWidget *parent = 0);
static GameView *m_instance;
ActionScene* m_actionScene;
SceneChanger* m_sceneChanger;
QList<GameScene *> m_scenes;
//! Timer used to scene updates
QTimer *m_gameTimer;
};
#endif // GameView_h
|