script_enemy_main
{    
    let imgEnemy="script\DanMUku\Stage3\Image\ParakoopaV.png";
    let count=-50;
    let a=0;
    let b=62;
    let r = 0;
    let angle=1;
    let tir ="script\DanMUku\Stage1\Son\tir.wav";
    let munch ="script\DanMUku\Stage1\Son\muncher.wav";

   @Initialize
   {
      LoadUserShotData("script\DanMUku\MUtir\MUtir.txt");
      LoadGraphic(imgEnemy);
      LoadSE(tir);
      LoadSE(munch);
            SetLife(1000); 
   }
   
   @MainLoop
   {
          SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 16);
if(count%10==0)
{
if(a==186)
{
a=0;
b=62;
}
else
{
a+=62;
b+=62;
}
}
if(count==0)
{
SetSpeed(0);
}
if(count==700)
{
SetSpeed(2);
}
if(count%4==0&&count>0&&count<700)
{
PlaySE(tir);
loop(4)
{
CreateShot01(GetX+r*cos(angle), GetY+r*sin(angle), 2, angle, 19, 10);
angle+=360/4;
}
}
if(count>0)
{
if(GetArgument==1)
{
angle+=3.5;
}
else
{
angle-=3.5;
}
}
count++;
yield;
   }
   @Finalize
   {
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
}
   
   @DrawLoop
   {
            SetColor(255,255,255);
            SetRenderState(ALPHA);
            SetTexture(imgEnemy);
            SetGraphicRect(a, 0, b, 59);
            DrawGraphic(GetX,GetY);
if(GetArgument==1)
{
SetGraphicAngle(180, 0, 0);
}
else
{
SetGraphicAngle(0, 0, 0);
}
   }

}
