-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgamecontrol.h
85 lines (70 loc) · 1.74 KB
/
gamecontrol.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
#ifndef GAMECONTROL_H
#define GAMECONTROL_H
#include <QList>
#include <QObject>
QT_BEGIN_NAMESPACE
class QGraphicsScene;
class QGraphicsProxyWidget;
class QGraphicsObject;
class QTimer;
class QSoundEffect;
class QPropertyAnimation;
class QSequentialAnimationGroup;
QT_END_NAMESPACE
class MainWindow;
class GameView;
class Settings;
class Welcome;
class Protagonist;
class Nenecchi;
class Assassin;
class Spikeweed;
class GameControl : public QObject {
Q_OBJECT
friend class MainWindow;
public:
explicit GameControl(QObject* parent = nullptr);
private slots:
void play();
void palse();
void resizeFullscreen(bool toggled);
void resizeWindow(bool toggled);
void showShape(bool toggled);
void noShowShape(bool toggled);
void setVolume(int v);
void showSettings();
void hideSettings();
void changeSettings();
void restoreSettings();
void newGame();
void reToTitle();
void clockThings();
void crushThings();
void neneAct();
void emergeAssassin();
void attack();
private:
void setScene();
void setWelcome();
void setSettings();
void setSettingsPos();
void setBgm(const QString& file);
QGraphicsScene* scene;
GameView* view;
QTimer *clock, *nene_clock, *assassin_clock;
Settings* settings;
Welcome* welcome;
QGraphicsProxyWidget* set;
QSoundEffect* bgm;
Protagonist* protangonist = nullptr;
Nenecchi* nenecchi = nullptr;
Assassin* assassin = nullptr;
Spikeweed* spikeweed = nullptr;
QPropertyAnimation* ani_sword = nullptr;
QPropertyAnimation* ani_assassin = nullptr;
QSequentialAnimationGroup* ani_nene_group = nullptr;
signals:
void inGame(bool in);
void notInSettings(bool in);
};
#endif // GAMECONTROL_H