-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenemy.h
More file actions
41 lines (33 loc) · 893 Bytes
/
enemy.h
File metadata and controls
41 lines (33 loc) · 893 Bytes
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
#ifndef ENEMY_H
#define ENEMY_H
#include "player.h"
#include "bullet.h"
#include <vector>
struct AttackPattern {
int delay;
int x;
int y;
Direction dir;
};
class Enemy : public Player
{
public:
Enemy(QPixmap &pixmap, int h, int d, Bounds b, std::vector<std::vector<AttackPattern>> a, std::string name, int gold, Item *item, std::string music)
: Player(pixmap, h, d, b, gold, Qt::GlobalColor::cyan) {
a_ = a;
name_ = name;
item_ = item;
music_ = QString::fromStdString(music);
}
int getFightDuration();
Item * getItem() { return item_; }
QString getMusic() { return music_; }
std::string getName() { return name_; }
std::vector<AttackPattern> GetFightPattern();
private:
std::vector<std::vector<AttackPattern>> a_;
std::string name_;
Item * item_;
QString music_;
};
#endif // ENEMY_H