
	#Title[zako1]
	#Text[zako]
	#ScriptVersion[2]
	
	script_enemy_main
	{
        let img = "script\ƒUƒR\zako2.PNG";
        let frame = 0;

      LoadCommonData;
		@Initialize
		{ 
              SetLife(60);

              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(6){
           move;
           shot;}
                    
                nige;
                   }
         sub move{ let x =rand(64, 384);

    SetMovePosition02(x,GetY+80, 30);
        loop(30){yield;}
        
                  }
         sub shot{    
let an=0;
         loop(15){
           CreateShot02(GetX, GetY, 1, an,0.1,3, BLUE12, 10);
           CreateShot02(GetX, GetY, 1, an+30,0.2,6, GREEN31,20);
           CreateShot02(GetX, GetY, 1, an-30,0.1,3, BLUE12, 10);
         an=an+63;
            loop(4){ yield;}

}
                 }
        sub nige{ 

             VanishEnemy;
                }
	}
  
