#e
#Title[puN[vouX-Easy-v]
#Text[]
#PlayLevel[Easy]
#ScriptVersion[2]

script_enemy_main {

 @Initialize {
  CutIn(KOUMA, spellCard[0], "", 0, 0, 0, 0);
  SetMovePosition02(GetCenterX, GetCenterY, startWait);
  SetLife(4000);
  SetTimer(70);
  SetScore(1000000);

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

  LoadUserShotData(GetCurrentScriptDirectory~"shot_All.txt");

  LoadSE(explosionSE);
  LoadSE(countdownSE);

  TMain;
 }

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

  yield;
 }

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

 @Finalize {
  DeleteGraphic(imgEnemy);

  DeleteSE(explosionSE);
  DeleteSE(countdownSE);
 }

 task TMain {
  yield;

  wait(startWait + 30);
  TShot1;
  TShot2;
 }

 task TShot1 { //xe
  let angle = 0;
  yield;

  loop {
   loop(2) {
    CreateShot01(GetX, GetY, 0.8, angle, 169, 0);
    angle += 180;
   }
   angle += 20;

   wait(30);
  }
 }

 task TShot2 { //eoue
  let angle = 0;
  let count = 0;
  yield;

  loop {
   wait(30);

   angle = GetAngleToPlayer;
   loop(8) {
    TBubbleShot(1.2, angle, count, 420, 8);
    angle += 45;
   }

   count += 1;
   if(count == 2) {
    count = 0;
   }

   wait(480);
  }
 }

 #include_function ".\includeFile.txt"

}