-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.h
51 lines (40 loc) · 1.13 KB
/
game.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
//game.h
#pragma once
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QObject>
#include "energygauge.h"
#include "player.h"
#include "laser.h"
#include "missleindicator.h"
class Game: public QObject
{
Q_OBJECT
QGraphicsScene *scene = new QGraphicsScene();
QGraphicsView *view = new QGraphicsView();
public:
static const int gameWidth = 1600;
static const int gameHeight = 900;
//cheats
static const bool unlimitedPower = false;
static const bool backWall = false;
static const int energyBoostRegularity = 50;
static const int asteroidRegularity = 50;
static const int ufoRegularity = 400;
static const int collisionDamage = 15;
static const int ufoBulletDamage = 5;
static const bool enableParticles = true;
EnergyGauge * energyGauge = new EnergyGauge();
Laser * laser = new Laser();
Player * player = new Player();
MissleIndicator* missleIndicator = new MissleIndicator();
Game();
void spawnStarStreak();
void spawnEnergyBoost();
void spawnAsteroid();
void spawnUfo();
public slots:
void emitFrame();
signals:
void frame();
};