-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenemy.h
More file actions
77 lines (66 loc) · 1.56 KB
/
enemy.h
File metadata and controls
77 lines (66 loc) · 1.56 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef ENEMY_H
#define ENEMY_H
#include<QPixmap>
#include<config.h>
#include<bullet.h>
//把敌人也视为子弹了,毕竟撞敌人也应受损
class enemy:public bullet
{
public:
enemy();
enemy_bullet *e_b[MAX_SHOOT]={};//不同点
int shoot_temp;//不同点
int nowCD;
int CD;//不同点
int duration;
int d;
int life;
virtual void move();//不同点
virtual void shoot();//不同点
void setDuration(int );
void die();
qreal theta;//记录move1()中圆弧转过的角度
void move1();//一种弧线运动,从左开始
void move2();//同上,从右开始
};
//为了方便,暂定发射弹型与敌人种类绑定
class yousei:public enemy{
public:
yousei();
yousei(int x_,int y_,int l_,int cd_,int h_);
virtual void move();
virtual void shoot();
};
class flower_yousei:public enemy{
public:
flower_yousei();
flower_yousei(int x_,int y_,int l_,int cd_,int h_);
virtual void move();
virtual void shoot();
};
class light_butterfly:public enemy{
public:
light_butterfly();
light_butterfly(int x_,int y_,int l_,int cd_,int h_);
};
class dark_butterfly:public enemy{
public:
dark_butterfly();
dark_butterfly(int x_,int y_,int l_,int cd_,int h_);
};
class mid_butterfly:public enemy{
public:
mid_butterfly();
mid_butterfly(int x_,int y_,int l_,int cd_,int h_);
};
class MAO:public enemy{
public:
MAO();
MAO(int x_,int y_,int l_,int cd_,int h_);
};
class inyo:public enemy{
public:
inyo();
inyo(int x_,int y_,int l_,int cd_,int h_);
};
#endif // ENEMY_H