-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgameloop.h
52 lines (48 loc) · 1.13 KB
/
gameloop.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
#ifndef GAME_LOOP_H
#define GAME_LOOP_H
#define MAP_SIZE 13
#define WIDTH 1132
#define HEIGHT 832
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <QKeyEvent>
#include <QGraphicsView>
#include <QWidget>
#include <QGraphicsScene>
#include <QGraphicsPixmapItem>
#include "player.h"
#include "enemy.h"
#include "bullet.h"
#include "score.h"
#include <QBrush>
#include <QTimer>
#include <QColor>
class Player;
class Enemy;
class Bullet;
class Score;
class GameLoop : public QGraphicsView
{
private:
int **map;
QGraphicsScene *scene;
QGraphicsView *viewer;
QGraphicsPixmapItem **grid;
Score *score;
Player *player;
Enemy *enemy;
QTimer *timer_move;
QTimer *timer_shoot;
public:
int **ft_get_map();
void ft_update_map(int **map);
void ft_print_map();
void ft_set_headquarters();
void ft_add_obstacle();
void ft_make_map();
void ft_destroy_map();
GameLoop();
~GameLoop();
};
#endif // GAME_LOOP_H