#搶曽抏枊晽
#Title[抏枊僥僗僩]
#Text[]
#ScriptVersion[2]

script_enemy_main {
 let img = "script\img\ExRumia.png";
 let name = "仜仜乽仜仜仜仜仜仜仜仜乿";
 let pet = 0;

 @Initialize {
  CutIn(KOUMA, name, "", 0, 0, 0, 0);
  SetX(GetCenterX);
  SetY(GetCenterY);
  SetLife(5000);
  SetScore(1000000);
  SetTimer(99);

  LoadGraphic(img);
  SetTexture(img);
  SetGraphicRect(64, 0, 128, 64);

  Concentration01(120);

  TMain;
 }

 @MainLoop {
  SetCollisionA(GetX, GetY, 24);
  SetCollisionB(GetX, GetY, 24);

  yield;
 }

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

 @Finalize {
  DeleteGraphic(img);
 }

 //埲壓僞僗僋(儅僀僋儘僗儗僢僪)

 task TMain {
  yield;

  TMove;
  TShot; //壗屄懌偟偰傕偍倠
 }

 task TMove {
  yield;
 }

 task TShot {
  loop {
   pet += 1;
   if(pet > 120) { //pet偑120埲忋偺帪偵{}傪幚峴
    if(pet % 6 == 0) { //pet偑6偺攞悢偺帪(0.1昩枅)偵{}傪幚峴
     CreateShot01(GetX, GetY, 1, 53, RED11, 0);
    }
   }
   yield;
  }
 }

 function wait(w) {
  loop(w) { yield; }
 }

}