-
Notifications
You must be signed in to change notification settings - Fork 0
/
BOSS.h
242 lines (218 loc) · 5.47 KB
/
BOSS.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
#pragma once
#include "GameObj.h"
#include "Effect.h"
#include "Scene.h"
//----------------------------------------------------------------------
//CBOSSクラス(全てのBOSSの基底クラス)
//----------------------------------------------------------------------
class CBOSS :public CGameObj
{
protected:
int m_anime, m_anime_count;
int m_frame_count,m_frame_count_laser;
int vitality,max_vitality,m_life;
int m_score;
int m_stage_num;
public:
void* operator new(size_t t) { return operator_new(t, Game->EnemyList); }
void operator delete(void* p) { operator_delete(p, Game->EnemyList); }
CBOSS(float x, float y, float w, float h, float r, int vitality, int life,int score, int stage)
:CGameObj(Game->EnemyList, x, y, w, h, r, 4.0f, 4.0f),m_stage_num(stage),
m_anime(0), m_anime_count(0), m_frame_count(0), m_frame_count_laser(0),
vitality(vitality), max_vitality(vitality),m_life(life),m_score(score)
{
}
virtual ~CBOSS(void)
{
}
virtual void base_HitorNot();
int GetVitality()
{
return vitality;
}
void SetVitality(int vit)
{
vitality =vit;
}
void SubtractVital(int attack)
{
vitality -=attack;
}
};
//----------------------------------------------------------------------
//CBOSS_1クラス(BOSS1クラス)
//----------------------------------------------------------------------
class CBOSS_1 :public CBOSS
{
float X_SPEED,Y_SPEED;
//第一段階
bool have_set1;
int frame_count1;
int shot_count;
int shot_count1;
float m_roll;
//第二段階
float m_rot_angle,m_angle_spd;
bool have_set2;
int frame_count2,m_shot_num;
int shot_count2;
//第三段階
bool have_set3;
int frame_count3;
int shot_count3,color_num;
bool add;
//最終段階
bool have_set4;
int frame_count4;
int shot_count4;
public:
void* operator new(size_t t) { return operator_new(t, Game->EnemyList); }
void operator delete(void* p) { operator_delete(p, Game->EnemyList); }
CBOSS_1(float x, float y)
:CBOSS(x, y, 90, 90, 40, 5000, 3, 500000, 1),
X_SPEED(0),Y_SPEED(0),
m_rot_angle(0),m_angle_spd(0),m_roll(0),
have_set1(false),frame_count1(0),shot_count(0),shot_count1(0),
have_set2(false),frame_count2(0),m_shot_num(0),shot_count2(0),
have_set3(false),frame_count3(0),shot_count3(0),color_num(0),add(true),
have_set4(false),frame_count4(0),shot_count4(0)
{
Game->SetBOSSHUD(m_life,vitality);
Game->music->Stop();
Game->music_boss->Play();
new CBOSSCrash(X,Y);
}
~CBOSS_1()
{
Game->SetBOSSHUD(0,0);
}
bool HitorNot();
bool Move();
void Draw();
bool Move_1();
bool Move_2();
bool Move_3();
bool Move_last();
void Shot_1();
void Shot_2();
void Shot_3();
void Shot_last();
};
//----------------------------------------------------------------------
//CBOSS_2クラス(BOSS2クラス)
//----------------------------------------------------------------------
class CBOSS_2 :public CBOSS
{
float X_SPEED,Y_SPEED;
//第一段階
bool have_set1;
int frame_count1;
int shot_count;
int shot_count1;
float m_roll;
//第二段階
float m_rot_angle,m_angle_spd;
bool have_set2;
int frame_count2,m_shot_num;
int shot_count2;
//第三段階
bool have_set3;
int frame_count3;
int shot_count3,color_num;
bool add;
//最終段階
bool have_set4;
int frame_count4;
int shot_count4;
public:
void* operator new(size_t t) { return operator_new(t, Game->EnemyList); }
void operator delete(void* p) { operator_delete(p, Game->EnemyList); }
CBOSS_2(float x, float y)
:CBOSS(x, y, 90, 90, 40, 5000, 3, 500000, 2),
X_SPEED(0),Y_SPEED(0),
m_rot_angle(0),m_angle_spd(0),m_roll(0),
have_set1(false),frame_count1(0),shot_count(0),shot_count1(0),
have_set2(false),frame_count2(0),m_shot_num(0),shot_count2(0),
have_set3(false),frame_count3(0),shot_count3(0),color_num(0),add(true),
have_set4(false),frame_count4(0),shot_count4(0)
{
Game->SetBOSSHUD(m_life,vitality);
Game->music->Stop();
Game->music_boss->Play();
new CBOSSCrash(X,Y);
}
~CBOSS_2()
{
Game->SetBOSSHUD(0,0);
}
bool HitorNot();
bool Move();
void Draw();
bool Move_1();
bool Move_2();
bool Move_3();
bool Move_last();
void Shot_1();
void Shot_2();
void Shot_3();
void Shot_last();
};
//----------------------------------------------------------------------
//CBOSS_3クラス(BOSS3クラス)
//----------------------------------------------------------------------
class CBOSS_3 :public CBOSS
{
float X_SPEED,Y_SPEED;
//第一段階
bool have_set1;
int frame_count1;
int shot_count;
int shot_count1;
float m_roll;
//第二段階
float m_rot_angle,m_angle_spd;
bool have_set2;
int frame_count2,m_shot_num;
int shot_count2;
//第三段階
bool have_set3;
int frame_count3;
int shot_count3,color_num;
bool add;
//最終段階
bool have_set4;
int frame_count4;
int shot_count4;
public:
void* operator new(size_t t) { return operator_new(t, Game->EnemyList); }
void operator delete(void* p) { operator_delete(p, Game->EnemyList); }
CBOSS_3(float x, float y)
:CBOSS(x, y, 90, 90, 40, 5000, 3, 500000, 3),
X_SPEED(0),Y_SPEED(0),
m_rot_angle(0),m_angle_spd(0),m_roll(0),
have_set1(false),frame_count1(0),shot_count(0),shot_count1(0),
have_set2(false),frame_count2(0),m_shot_num(0),shot_count2(0),
have_set3(false),frame_count3(0),shot_count3(0),color_num(0),add(true),
have_set4(false),frame_count4(0),shot_count4(0)
{
Game->SetBOSSHUD(m_life,vitality);
Game->music->Stop();
Game->music_boss->Play();
new CBOSSCrash(X,Y);
}
~CBOSS_3()
{
Game->SetBOSSHUD(0,0);
}
bool HitorNot();
bool Move();
void Draw();
bool Move_1();
bool Move_2();
bool Move_3();
bool Move_last();
void Shot_1();
void Shot_2();
void Shot_3();
void Shot_last();
};