#e
#Title[uÕXR[v]
#Text[G@ĹuXǏPv
ՓxŒ̃Xył]
#ScriptVersion[2]
#Player[FREE]

script_enemy_main {
 let img = "script\img\ExRumia.png";
 let name = "uÕXR[v";

 @Initialize {
  CutIn(KOUMA, name, "", 0, 0, 0, 0);
  SetX(GetCenterX);
  SetY(GetCenterY);
  SetLife(2000);
  SetScore(1000);

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

  TMain;
 }

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

  yield;
 }

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

 @Finalize {
  DeleteGraphic(img);
 }

 task TMain {
  yield;

  TShot;
  TLaser;
 }

 task TShot {
  yield;

  loop {
   loop(120) { yield; }
   CreateLaser01(GetCenterX, GetCenterY - 150, 0.8, 90, 1000, 500, PURPLE11, 0);
   CreateShot01(GetClipMaxX, GetClipMinY + 10, 5, 180, PURPLE03, 0);
   wait(600);
  }
 }

 task TLaser {
  yield;

  loop {
   loop(1) { yield; }
   CreateLaser01(GetClipMaxX, GetCenterY - 180, 3, 180, 400, 10, BLUE11, 0);
   wait(120);
  }
 }

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

}