-
Notifications
You must be signed in to change notification settings - Fork 1
/
bubbleBullet.h
62 lines (52 loc) · 1.01 KB
/
bubbleBullet.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
#ifndef BUBBLEBULLET_H
#define BUBBLEBULLET_H
#include "bubble.h"
#include <QImage>
#include <QRect>
class Bullet : public Bubble
{
public:
Bullet();
~Bullet();
public:
void startPosition(int, int);
void resetState();
void moveLeft(int);
void moveRight(int);
void moveTop(int);
void moveBottom(int);
void autoMove();
void autoMoveRight();
void autoMoveLeft();
void autoMoveDown();
void setXDirL(int);
void setXDirR(int);
void setYDir(int);
void setSpeed(int);
void compare(int, int);
int getSpeed();
void setDirection(char);
char getDirection();
int getXDirL();
int getXDirR();
int getYDir();
bool isMoving();
void setMoving(bool);
bool hasDisappeared();
void setDisappeared(bool);
QRect getRect();
QImage & getImage();
private:
int speed;
int xdirL;
int ydir;
int xdirR;
int initX;
int initY;
char direction;
bool moving;
bool disappeared;
QImage image;
QRect rect;
};
#endif