弾幕名:なし (「そして誰もいなくなるか?」のサンプル)
作製難易度:★ (1/10)
実行結果
---- boss_shotH.cpp に以下を追加 ---- //周りから直線発射 void boss_shot_bulletH007(){ #define TM007 300 #define DNUMX 9 int i,j,k,s,t=boss_shot.cnt%TM007,t2=boss_shot.cnt; double xlen=FMX/DNUMX;//画面にDNUM個並べるにはxlen間隔で並べればいい int dnumy=FMY/xlen;//xlenずつならべると鉛直方向にいくつはいるか int cnum; if(dnumy==0){printfDx("boss_shot_bulletH006で0割り\n"); return ;} double ylen=FMY/dnumy;//ylenずつおけばいい double x,y,angle; static int num; if(t2==0)num=0; if(t==0){ x=0,y=0,angle=0,cnum=0; for(j=0;j<4;j++){ int to=j%2 ? dnumy: DNUMX ; for(i=0;i<=to;i++){ for(s=0;s<2;s++){ if((k=search_boss_shot())!=-1){ boss_shot.bullet[k].x = x;//座標 boss_shot.bullet[k].y = y; boss_shot.bullet[k].knd = 4;//弾の種類 boss_shot.bullet[k].flag = 1; boss_shot.bullet[k].cnt = 0; switch(num){ case 0://直線 boss_shot.bullet[k].col = 0;//弾の色 boss_shot.bullet[k].angle = angle+PI/2;//角度 boss_shot.bullet[k].spd = 1.1+0.5*s;//スピード boss_shot.bullet[k].state = 0;//ステータス break; case 1://斜め交差 boss_shot.bullet[k].col = 3;//弾の色 boss_shot.bullet[k].angle = angle+PI/2-PI/14+PI/7*s;//角度 boss_shot.bullet[k].spd = 1.3;//スピード boss_shot.bullet[k].state = 1;//ステータス break; } se_flag[0]=1; cnum++; } } x+=cos(angle)*xlen; y+=sin(angle)*ylen; } angle+=PI/2; } } if(t==TM006-1) num=(++num)%2; }
変更されているfunc.hも確認しておいて下さい。
またまた安置があるので調整は必要です。
- Remical Soft -