#東方弾幕風
#Title[ネウフ・デ・ソード]
#Text[９さんのを改造させて貰いました。]
#ScriptVersion[2]

script_enemy_main {
 let img = "script\img\ExRumia.png";
 let name = "拒絶「ネウフ・デ・ソード」";

 @Initialize {
  CutIn(KOUMA, name, "", 0, 0, 0, 0);
  SetX(GetCenterX);
  SetY(GetCenterY - 120);
  SetLife(4000);
  SetScore(1000000);
  SetTimer(75);

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

  TMain;
 }

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

  yield;
 }

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

 @Finalize {
  DeleteGraphic(img);
 }

 //以下タスク(マイクロスレッド)

 task TMain {
  yield;

  TMove;
  TShot;
  TShot2;
  TShot3;
  TShot4;
  TShot5;
  TShot6;
  TShot7;
  TShot8; //何個足してもおｋ
}

 task TMove {
  yield;
 }

 task TShot {

SetShotDirectionType(PLAYER);

  let angle = 0;
  yield;

  loop {
   loop(5) { yield; }
   CreateShot01(GetX , GetY + 80, 1, angle, RED32, 50);
   angle += 30;
  }
 }

 task TShot2 {

SetShotDirectionType(PLAYER);

  let angle = 0;
  yield;

  loop {
   loop(5) { yield; }
   CreateShot01(GetX , GetY - 80, 1, angle, ORANGE32, 50);
   angle -= 30;
  }
 }


 task TShot3 {

SetShotDirectionType(PLAYER);

  let angle = 0;
  yield;

  loop {
   loop(5) { yield; }
   CreateShot01(GetX + 80, GetY , 5, angle -180, BLUE32, 50);
   angle += 30;
  }
 }


 task TShot4 {

SetShotDirectionType(PLAYER);

  let angle = 0;
  yield;

  loop {
   loop(5) { yield; }
   CreateShot01(GetX - 80, GetY, 5, angle -180, YELLOW32, 50);
   angle -= 30;
  }
 }


 task TShot5 {
  let angle = 0;
  yield;

  loop {
   loop(2) { yield; }
   CreateShot01(GetX + 80, GetY - 80, 3, angle +90, AQUA32, 50);
   angle += 10;
  }
 }

 task TShot6 {
  let angle = 0;
  yield;

  loop {
   loop(2) { yield; }
   CreateShot01(GetX + 80 , GetY + 80, 3, angle +90, GREEN32, 50);
   angle += 10;
  }
 }

 task TShot7 {
  let angle = 0;
  yield;

  loop {
   loop(1) { yield; }
   CreateShot01(GetX - 80, GetY - 80, 3, angle, PURPLE32, 50);
 

   angle -= 10;
  }
 }

 task TShot8 {
  
  let angle = 0;
  yield;

  loop {
   loop(1) { yield; }
   CreateShot01(GetX - 80 , GetY + 80, 3, angle +90, WHITE32, 50);
  
   angle -= 10;
  }
 }


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

}
