-
Notifications
You must be signed in to change notification settings - Fork 0
/
gamewindow.h
66 lines (59 loc) · 1.33 KB
/
gamewindow.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
66
#ifndef GAMEWINDOW_H
#define GAMEWINDOW_H
#include <QMainWindow>
#include <QAction>
#include <QMenu>
#include <QMenuBar>
#include <QTimer>
class GameWindowScene;
class Map;
class Player;
class System;
class GameWindow : public QMainWindow
{
Q_OBJECT
public:
GameWindow();
GameWindow(QString);
virtual ~GameWindow();
void closeEvent (QCloseEvent*);
void back_to_main_window();
void set_play_time(int);
void set_invincible_time(int);
void set_bag_full_show_time(int);
void set_use_item_time(int);
void set_use_item_img(QString);
int get_play_time();
int get_invincible_time();
int get_bag_full_show_time();
int get_use_item_time();
QString get_use_item_img();
private:
void create_actions();
void create_menus();
void destructor();
private slots:
void show_about();
void show_use();
void show_bag();
void save_file();
void pause_game();
void exit_pause_game();
void back_to_main_window_slot();
void sub_time();
void add_play_time();
private:
Map *map; // view
GameWindowScene *scene; // scene
Player *player; // item
QAction *menu_actions[4][6];
QMenu *menus[4];
QTimer *timer, *energy_timer;
System *system;
int play_time;
int invincible_time;
int bag_full_show_time;
int use_item_show_time;
QString use_item_img;
};
#endif // GAMEWINDOW_H