script_enemy_main
{    
    let imgEnemy="script\DanMUku\Stage3\Image\Bob-Bomb.png";
    let count=-50;
    let a=0;
    let b=46;
    let y = 0;
    let circle = [];
    let angle=1;
    let l = 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==235)
{
a=0;
b=46;
}
else
{
a+=47;
b+=47;
}
}
count++;
yield;
   }
   @Finalize
   {
loop(36)
{
l=rand(0, 30);
PlaySE(tir);
CreateShot01(GetX, GetY, 2, angle, RED04, 10);
angle+=l;
}
loop(6)
{
CreateItem(ITEM_SCORE, rand(GetX-10, GetX+10), rand(GetY-10, GetY+10));  
}
if (GetX>0&&GetY>0&&GetX<448&&GetY<480&&GetCommonData("bombe")>=0) {
	SetCommonData("bombe", GetCommonData("bombe")+1);
}

}
   
   @DrawLoop
   {
            SetColor(255,255,255);
            SetRenderState(ALPHA);
            SetTexture(imgEnemy);
            SetGraphicRect(a, 0, b, 35);
            DrawGraphic(GetX,GetY);
   }

}
