
script_enemy_main
{    
    let count=-150;
    let laser ="script\DanMUku\Stage2\Son\laser.wav";
    let n;
    let angular;

 function Wait(let frames){
   loop(frames){yield;}
 }


   @Initialize
   {
      LoadUserShotData("script\DanMUku\MUtir\MUtir.txt");
      LoadSE(laser);
            SetLife(100);
	n=GetArgument[0];
	angular = GetArgument[2];
   }
   
   @MainLoop
   {
          //SetCollisionA(GetX, GetY, 16);
        SetCollisionB(GetX, GetY, 16);

	if (count%5==0) {
		CreateShotA(1, GetX, GetY, 15);
		SetShotDataA(1,0,0,0,0,0,0,90);
		SetShotKillTime(1, 14);
		FireShot(1);
	}

	if (count==0) {
		SetSpeed(0);
		ascent(i in 0..n) {
			CreateLaserB(i, 0, 20, GetArgument[1], 50);
			SetLaserDataB(i, 0, GetArgument[3]/50, 20, 0, i*(360/n), angular, i*(360/n), angular);
			SetLaserDataB(i, 50, 0, 20, 0, NULL, angular, NULL, angular);
			FireShot(i);
		}
	}

	if (count==35) {
		PlaySE(laser);
	}


count++;
yield;
   }
   @Finalize
   {
   }
   

   @DrawLoop
   {


   }


}
