-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer.h
58 lines (54 loc) · 1.94 KB
/
player.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 PLAYER_H
#define PLAYER_H
#include <QGraphicsRectItem>
#include <QGraphicsPixmapItem>
#include <QGraphicsItem>
#include <QKeyEvent>
#include <QDebug>
#include <QMediaPlayer>
#include "gameloop.h"
#include "enemy.h"
#include "bullet.h"
#include "score.h"
class Enemy;
class Bullet;
class GameLoop;
class Score;
class Player : public QGraphicsPixmapItem
{
private:
int x_pos;
int y_pos;
int up;
int down;
int left;
int right;
int **map;
QMediaPlayer *bullet_sound;
QGraphicsPixmapItem **grid;
Enemy *enemy;
Score *score;
public:
void keyPressEvent(QKeyEvent *event);
int ft_get_x();
int ft_get_y();
void ft_set_x(int x);
void ft_set_y(int y);
void ft_spanw();
void ft_create_map(int **map);
void ft_update_map(int **map);
int **ft_player_map();
int ft_rotate_left();
int ft_rotate_right();
int ft_rotate_up();
int ft_rotate_down();
void ft_set_grid(QGraphicsPixmapItem **grid);
QGraphicsPixmapItem **ft_get_grid();
Player();
void ft_set_enemy(Enemy *e);
Enemy *ft_get_enemy();
void ft_incr_score();
Score *ft_get_score();
void ft_set_score(Score *score);
};
#endif // PLAYER_H