
	#Title[zako1]
	#Text[zako]
	#ScriptVersion[2]
	
	script_enemy_main
	{
        let img = "script\ƒUƒR\zako2.PNG";
        let frame = 0;
        let ang=60;
		@Initialize
		{ 
              SetLife(60);
              SetScore(GetLife/2+GetLife/2*GetPlayerLife);
              LoadGraphic(img);
              SetTexture(img);  SetGraphicRect(0, 0, 64, 64);
             TMain;
		
		}
			
		@MainLoop
		{
              SetScore(30+30*GetPlayerLife);
    SetCollisionA(GetX, GetY, 24);
    SetCollisionB(GetX, GetY, 24);
   yield;
		}
		
		@DrawLoop
		{
		   DrawGraphic(GetX, GetY);
		}
			
		@Finalize
		{

		}
         task TMain{
               yield;
            loop(4){move;
                    shot;
                    }
                nige;
                   }
         sub move{ let x =rand(64, 384);
                   let y =rand(240, 48);
     SetMovePosition02(GetX+90, GetY, 60);
        loop(60) { yield; }
                  }
         sub shot{     
      loop(3){
   loop(6){
           CreateShot01(GetX, GetY, 2, ang, AQUA02, 20);
         ang=ang+60;
          }loop(20){yield;}ang=ang+30;}
         
        loop(30) { yield; } 
                 }
        sub nige{ 
              SetMovePosition02(GetX, GetClipMinY, 60);
        loop(60) { yield; } 
             VanishEnemy;
                }
	}
  
