-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathController.h
60 lines (54 loc) · 1.33 KB
/
Controller.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
#ifndef CONTROLLER_H
#define CONTROLLER_H
#include <QObject>
#include <QGraphicsScene>
#include <QTimer>
#include <QGraphicsRectItem>
#include "Zombie.h"
#include "Score.h"
#include "Sun.h"
#include "MasterZombie.h"
#include "Block.h"
#include "ShooterBoard.h"
#include "SunflowerBoard.h"
#include "OakBoard.h"
#include "CherryBoard.h"
#include "PlantBoard.h"
#include "Shovel.h"
class Controller : public QObject
{
Q_OBJECT
friend class View;
private:
int level;
int zombies;
Shovel* shovel;
CherryBoard* cherryBoard;
SunflowerBoard* sunflowerBoard;
OakBoard* oakboard;
ShooterBoard* shooterBoard;
QGraphicsScene * scene;
QTimer * cTimer;
QGraphicsRectItem * holder;
QList<Zombie *> zombieList;
QList<MasterZombie*> masterZombieList;
QList<Sun *> sunList;
QList<Block* > controllerBlocks;
Score * controllerScore;
//int timeintervalse;
public:
explicit Controller(int level = 1 ,QObject *parent = nullptr);
~Controller();
void addZombie(const int& velocity , const int& lives, int line);
void addMasterZombie(const int& velocity , const int& lives, int line);
void addSun();
void addOak();
void addCherry();
int getRound();
signals:
void endRound(int );
public slots:
void addBoard();
void calculateZombie();
};
#endif // CONTROLLER_H