#東方弾幕風 #Title[通常1] #Text[ ] #Image[] #BackGround[Default] #Player[FREE] #ScriptVersion[2] script_enemy_main {//hina通常弾幕1 let csd = GetCurrentScriptDirectory(); let current = GetCurrentScriptDirectory(); let BGM=GetCurrentScriptDirectory~".\BGM\08. フォールオブフォール 〜 秋めく滝.mp3"; let count=0; let frame=0; let angleBase =10; let angle=10; let span=0; let imgBack =GetCurrentScriptDirectory~".\img\haikei.png"; let cx = GetCenterX();//STGシーンの中心x座標を取得 let imgaya =GetCurrentScriptDirectory~"img\aya.png"; let sekir = current~"SE\se_tan00音量小.wav"; let cy = GetCenterY; let Bx=0; let By=0; let seShot = current~"SE\se_tan00音量小.wav"; let selaz = current~"SE\se_lazer00.wav"; let seHit = current ~ "SE\se_damage01.wav"; let seShot2 = current~"SE\se_tan02.wav"; @Initialize { SetLife(3000);//ライフを1500に設定 SetTimer(60);//時間制限を60秒に設定 SetGraphicRect(199, 83, 246, 149);//描画元矩形を設定 SetInvincibility(120);//敵を30フレーム無敵にする LoadGraphic(imgaya);//画像「img\Keine.png」を読みこむ LoadGraphic(imgBack); SetMovePosition02(cx+0,60,30);//座標(cx,60)へ60フレームかけて移動する DeleteEnemyShot(ALL);//出現と同時に敵弾を全て削除 LoadMusic(BGM); LoadSE( seShot ); LoadSE( seShot2 ); LoadSE( seHit ); LoadSE( selaz ); PlayMusic(BGM); SetEffectLayer(0); SetShotAutoDeleteClip(500,500,500,500); LoadUserShotData(GetCurrentScriptDirectory ~ "shot_pellet.txt"); //☆ //1-白 2-赤 3-紫 4-青 5-水色 6-黄緑 7-黄色 8-白? } @MainLoop { SetCollisionA(GetX, GetY, 24); SetCollisionB(GetX, GetY, 24); frame++; if(frame == 30) { let angle = angleBase - 0; loop(1) { ascent (i in 0..72){ CreateShotA(0,GetX,GetY,0); SetShotDataA(0,0,4, angle,0,0,4,BLUE01); SetShotDataA(0,20,4, GetAngleToPlayer,0,0,4,BLUE01); angle +=5; FireShot(0); } // SetShotDataA(0,100,4, GetAngleToPlayer,0,0,4,BLUE01); PlaySE(seShot); } angleBase += 8; frame = 20; } if(count==150) { SetMovePositionRandom01(50,20,5,GetClipMinX()+100,30,GetClipMaxX()-100,100); } if(count==160){count=89;}; SetCollisionA(GetX(),GetY(),32);//当たり判定(自弾)登録 SetCollisionB(GetX(),GetY(),24);//当たり判定(体当たり)登録 count++; } @Finalize {//読みこんだファイルを削除 DeleteGraphic(imgaya); } @DrawLoop { SetRenderState(ALPHA); SetGraphicScale(1,1); SetTexture(imgaya); if(GetSpeedX==0) { SetGraphicRect(191, 127, 255, 191); } else if(GetSpeedX>0) { SetGraphicRect(191, 63, 255, 127); } else if(GetSpeedX<0) { SetGraphicRect(191, 63, 255, 127); } DrawGraphic(GetX,GetY); } } //6,7,58,69 //199,88,251,144