-
Notifications
You must be signed in to change notification settings - Fork 0
/
playscene.h
58 lines (50 loc) · 1.04 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
#ifndef PLAYSCENE_H
#define PLAYSCENE_H
#include <QMainWindow>
#include <QPainter>
#include <QTimer>
#include <QSound>
#include <QDebug>
#include <QPixmap>
#include <QMenu>
#include <QMenuBar>
#include <QLabel>
#include <QAction>
#include <QDebug>
#include "dataconfig.h"
#include "mycoin.h"
#include "mypushbutton.h"
namespace Ui {
class PlayScene;
}
class PlayScene : public QMainWindow
{
Q_OBJECT
public:
PlayScene(int level,QWidget *parent = 0);
~PlayScene();
//重写绘图事件
void paintEvent(QPaintEvent *ev);
//初始化返回按钮
void initBackBtn();
//初始化金币
void initCoin();
//金币翻转和状态更新
void coinClicked(int i,int j);
//判断是否胜利
bool isWin();
//赢了的图标动画
void jump(QLabel * label);
void setLose();
void setWin();
private slots:
void on_actionquit_triggered();
signals:
void playSceneBack();
private:
Ui::PlayScene *ui;
int level;
int coinData[4][4];
MyCoin * coinArray[4][4];
};
#endif // PLAYSCENE_H