-
Notifications
You must be signed in to change notification settings - Fork 0
/
scene.h
58 lines (55 loc) · 1.19 KB
/
scene.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 SCENE_H
#define SCENE_H
#include "block.h"
#include "entity.h"
#include "config.h"
#include "popup.h"
#include <QVector>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QTimer>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>
#include <cmath>
#include <QtMultimedia/QMediaPlayer>
#include <QMediaPlaylist>
#include "musics.h"
class MapScene : public QGraphicsScene
{
public:
MapScene(QWidget *parent);
~MapScene();
void Load(int level);
void Start();
void Pause();
void Clear();
void Refresh();
void DoZ();
void DoX();
void giveDeath(Entity* ett);
void Teleport(int level);
void Pickup(Item* it);
void Shoot(Player* shooter);
void Shoot(Npc* shooter);
Entity* getWatashi(){return Watashi;}
int nowlevel;
private:
QVector<Block*> qtbmap;
QVector<Entity*> charas;
Player *Watashi;
QTimer *tick;
QWidget *parent;
QGraphicsView *view;
QJsonObject LevelInfo;
QVector<Item*> ItemList;
Moji *moji;
QMediaPlayer *BGM;
QMediaPlayer *Sounds;
QMediaPlaylist *bgmlist;
QSet<Entity*> GC;
QVector<Entity*> tmp;
bool GG;
};
#endif // SCENE_H