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

   @Initialize
   {
      LoadGraphic(imgEnemy);
      LoadSE(tir);
      LoadSE(munch);
            SetLife(200); 
   }
   
   @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%50==0&&count>0&&count<400)
{
loop(6)
{
PlaySE(tir);
CreateShot01(GetX, GetY, 2, angle, GREEN01, 10);
angle+=60;
}
}
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));  
}
   
   @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);
}
   }

}
