-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayscene.h
88 lines (75 loc) · 1.71 KB
/
playscene.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#ifndef PLAYSCENE_H
#define PLAYSCENE_H
#include <QWidget>
#include"suspend.h"
#include <QDateTime>
#include <QTimer>
#include <QTime>
#include <QPixmap>
#include <QIcon>
#include<QSound>
#include<QMediaPlayer>
#include"end.h"
#include"died.h"
namespace Ui {
class playscene;
}
class playscene : public QWidget
{
Q_OBJECT
public:
explicit playscene(QWidget *parent = nullptr);
~playscene();
void paintEvent(QPaintEvent*);
void keyPressEvent(QKeyEvent *);
void gameover();
void checkgameover();
void victory();
void checkvictory();
void checkreda1();
void checkreda2();
void checkreda3();
void checkreda4();
void checkbluea1();
void checkbluea2();
void checkbluea3();
void checkbluea4();
void checkban1();
void checkstatus();
void checkban2();
void checkdoor();
suspend *zant;
died *die;
end *endd;
//定时器
QTimer * timer; //定时器 每秒更新时间
QTime * TimeRecord; //记录时间
signals:
//返回choose
void suspendback();
private:
Ui::playscene *ui;
int ban2status;
int sunx;
int suny;
int moonx;
int moony;
int boxx;
int boxy;
int redax[4];
int reday[4];
int blueax[4];
int blueay[4];
int ban1x;
int ban1y;
int ban2x;
int ban2y;
int ganx[2];
int gany[2];
int doorx[2];
int doory[2];
private slots:
void updateTime();
void on_Stop_clicked();
};
#endif // PLAYSCENE_H