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

 
      LoadCommonData;
		@Initialize
		{ 
              SetLife(250);


              LoadGraphic(img);
              SetTexture(img);  SetGraphicRect(0, 0, 64, 64);
             TMain;
		
		}
			
		@MainLoop
		{
                 SetScore(125+125*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);
                   let y =rand(240, 48);
   SetMovePosition02(rand(GetClipMinX,GetClipMaxX),GetClipMaxY-30, 30);
        loop(30){yield;}

        yield;
                  }
         sub shot{  
 CreateLaserA(359,GetX,GetY,600,40,PURPLE01,30);
SetLaserDataA(359,0,270,0,0,0,0);
SetShotKillTime(359,120);
FireShot(359);
        loop(120) { yield; } 
                 }
        sub nige{ 
              SetMovePosition02(GetX,GetClipMaxY+60, 30);
        loop(30){yield;}
             VanishEnemy;
                }
	}
  
