「ナイトバード」を作ってみたのですが、どうも弾のスピードをうまく決めることができません。
本家ではPI/2(下向き)の方向の弾が遅く、そこから右または左に行くほど弾速が速くなり完全な円でない曲線ができますよね。そういった弾速の違いからできる曲線はどうすれば作ることができるでしょうか?
//「ナイトバード」 void boss_shot_bulletH008(){ #define TM008 50 int i,n,k,t=boss_shot.cnt%TM008; float rand1,rand2; if(t==0){ for(n=1;n<5;n++){//左 rand1=rang(PI/12); for(i=1;i<15;i++){ if((k=search_boss_shot())!=-1){ boss_shot.bullet[k].knd =2; boss_shot.bullet[k].angle =PI/3+PI*2/3*i/15+rand1; boss_shot.bullet[k].flag =1; boss_shot.bullet[k].x =boss.x+cosf(PI/3+PI*2/3*i/15+rand1)*10; boss_shot.bullet[k].y =boss.y+sinf(PI/3+PI*2/3*i/15+rand1)*10; boss_shot.bullet[k].col =13; boss_shot.bullet[k].cnt =0; boss_shot.bullet[k].spd =??; se_flag[0]=1; } } } } if(t==40){ for(n=1;n<5;n++){//右 rand2=rang(PI/12); for(i=1;i<15;i++){ if((k=search_boss_shot())!=-1){ boss_shot.bullet[k].knd =2; boss_shot.bullet[k].angle =PI*2/3-PI*2/3*i/15+rand2; boss_shot.bullet[k].flag =1; boss_shot.bullet[k].x =boss.x+cosf(PI*2/3-PI*2/3*i/15+rand2)*10; boss_shot.bullet[k].y =boss.y+sinf(PI*2/3-PI*2/3*i/15+rand2)*10; boss_shot.bullet[k].col =11; boss_shot.bullet[k].cnt =0; boss_shot.bullet[k].spd =??; se_flag[0]=1; } } } } }
