-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenemy.h
58 lines (42 loc) · 777 Bytes
/
enemy.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 ENEMY_H
#define ENEMY_H
#include <QRect>
#include <QImage>
#include <QString>
#include "weapon.h"
//#include "powerup.h"
class Enemy
{
public:
Enemy(QString, int, int);
virtual ~Enemy();
void resetState();
void setPosition(int, int);
bool isDestroyed();
void setDestroyed(bool);
QRect getRect();
void setRect(QRect);
QImage & getImage();
int getXDir();
void setXDir(int);
int getYDir();
void setYDir(int);
virtual void autoMove();
void moveBottom(int);
void moveTop(int);
void moveLeft(int);
void moveRight(int);
Weapon* getWeapon();
void releaseWeapon();
//Powerup* getPowerup();
//void releasePowerup();
protected:
QRect rect;
QImage image;
bool destroyed;
Weapon *weapon;
//Powerup *powerup;
int xDir;
int yDir;
};
#endif