forked from Haroooold/motaGroup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.h
65 lines (57 loc) · 1.49 KB
/
Game.h
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
58
59
60
61
62
63
64
65
/*
* File: Game.h
* ------------
* This file exports the class <code>Game</code>, which is the main part
* to start game.
*/
#ifndef GAME_H
#define GAME_H
#include <QGraphicsView>
#include <QWidget>
#include <QGraphicsScene>
#include <QMediaPlayer>
#include "Monster.h"
#include "Map.h"
#include "Hero.h"
#include "npc.h"
#include "Item.h"
#include "backpack.h"
class Game: public QGraphicsView
{ Q_OBJECT
public:
// constructor
Game(QWidget* parent=nullptr);
// public variables
QGraphicsScene* scene;
Hero* hero;
Map* maps;
backpack* backpackSys;
QGraphicsTextItem* hpText;
QGraphicsTextItem* atkText;
QGraphicsTextItem* defText;
QGraphicsTextItem* lvText;
QGraphicsTextItem* expText;
QGraphicsTextItem* moneyText;
QGraphicsTextItem* floorText;
QGraphicsTextItem* yellowKeyText;
QGraphicsTextItem* blueKeyText;
QGraphicsTextItem* redKeyText;
QGraphicsTextItem* floorFlyText;
QGraphicsTextItem* monsterSearchText;
// public methods
void displayMainMenu();
void drawPanel(int x, int y, int width, int height, QColor color, double opacity); // draw information window
void renderFloor(int f); // show floor
void gameOver();
void displayGameoverWindow(QString textToDisplay);
void updateInfo();
public slots:
void subtitleMove(); // subtitle move
void start();
void restartGame();
void drawGUI();
void showLoad();
void showSave();
void showLoadOnMainMenu();
};
#endif // GAME_H