sin波が左右から迫ってくるというものです。
今のところは左からのみを実装したのですが、どうも垂直方向の弾の変化がないのです
void boss_shot_bulletH011(){//「光り輝く水底のトラウマ」
#define TM011 400
int n,k,k2,cnt,state,t0=boss_shot.cnt%TM011;
float angle;
angle=0;
for(n=0;n<8;n++){
if(t0%10==0){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =2;
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].angle =0;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].x =0;
boss_shot.bullet[k].y =0;
boss_shot.bullet[k].x0 =0-n*15;
boss_shot.bullet[k].y0 =30+n*30;
boss_shot.bullet[k].col =6;
boss_shot.bullet[k].spd =0;
boss_shot.bullet[k].till =100;
boss_shot.bullet[k].state =1;
boss_shot.bullet[k].eff_detail=1;
}
se_flag[0]=1;
}
}
if(t0%10==0){//
for(n=0;n<8;n++){
if((k=search_boss_shot())!=-1){
boss_shot.bullet[k].knd =2;
boss_shot.bullet[k].cnt =0;
boss_shot.bullet[k].angle =0;
boss_shot.bullet[k].flag =1;
boss_shot.bullet[k].x =0;
boss_shot.bullet[k].y =0;
boss_shot.bullet[k].x0 =0-n*15;
boss_shot.bullet[k].y0 =30+n*30;
boss_shot.bullet[k].col =6;
boss_shot.bullet[k].spd =0;
boss_shot.bullet[k].till =100;
boss_shot.bullet[k].state =-1;
boss_shot.bullet[k].eff_detail=1;
}
se_flag[0]=1;
}
}
for(k2=0;k2<BOSS_BULLET_MAX;k2++){
state=boss_shot.bullet[k2].state;
if(boss_shot.bullet[k2].flag>0){
boss_shot.bullet[k2].x=boss_shot.bullet[k2].x0+cosf(angle)*(boss_shot.bullet[k2].cnt*1.0)+cosf(angle+state*PI/2)*sinf(boss_shot.bullet[k2].cnt*0.02)*20;
boss_shot.bullet[k2].y=boss_shot.bullet[k2].y0+sinf(angle)*(boss_shot.bullet[k2].cnt*1.0)+sinf(angle+state*PI/2)*sinf(boss_shot.bullet[k2].cnt*0.02)*20;
}
}
}
