
script_enemy_main
{    
   let imgEnemy="script\DanMUku\Stage4\Image\j64.png";
   let count=0;
   let d=0;
   let x=GetX;
   let colour=0;
   let couleur=[38, 43, 40, 45, 47, 50];
   @Initialize
   {            
		LoadUserShotData("script\DanMUku\MUtir\MUtir.txt");
            LoadGraphic(imgEnemy);
            SetLife(15);    
   }
   
   @MainLoop
   {
	if(count%12==0)
	{
		colour=rand_int(53,58);
		d=rand(80,100);
		CreateShot01(GetX, GetY, 5, d, colour, 0);
		CreateShot02(GetX, GetY, 1, d, 0.5, 8, couleur[colour-53], 0);

	}
      count++;
   }
   
   @Finalize
   {
      DeleteGraphic(imgEnemy);
   }
   
   @DrawLoop
   {
	if(x>GetX){
		SetGraphicAngle(180,0,0);
	}
	if(x<GetX){
		SetGraphicAngle(0,0,0);
	}
      x=GetX;
      SetColor(255,255,255);
            SetRenderState(ALPHA);
            SetTexture(imgEnemy);
            SetGraphicRect(0,0,36,43);
            DrawGraphic(GetX,GetY);
   }
}
