-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbullet.h
62 lines (45 loc) · 908 Bytes
/
bullet.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
61
62
#ifndef BULLET_H
#define BULLET_H
#include <QRect>
#include <QImage>
class Bullet
{
private:
int xPos, yPos;
char symbol;
bool attackPlayer;
bool isDiagonal;
bool destroyed;
int yDir;
int xDir;
int speed;
QImage image;
QRect rect;
public:
Bullet();
Bullet (bool, bool, int, int);
~Bullet();
void moveBullet();
bool getAttackPlayer() const;
bool getDiag() const;
int getX () const;
int getY () const;
char getSymbol () const;
void setX (int);
void setY (int);
void moveBulletDiag();
bool isDestroyed();
void setDestroyed(bool);
void setXDir(int);
int getXDir();
int getYDir();
void setYDir(int);
void moveBottom(int);
void moveTop(int);
void moveLeft(int);
void moveRight(int);
void autoMove(int);
QRect getRect();
QImage & getImage();
};
#endif // BULLET_H