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

      LoadCommonData;
		@Initialize
		{ 
              SetLife(20);

              LoadGraphic(img);
              SetTexture(img);  SetGraphicRect(0, 0, 64, 64);
             TMain;
		
		}
			
		@MainLoop
		{
              SetScore(10+10*GetPlayerLife);
    SetCollisionA(GetX, GetY, 24);
    SetCollisionB(GetX, GetY, 24);
   yield;


		}
		
		@DrawLoop
		{
		   DrawGraphic(GetX, GetY);
		}
			
		@Finalize
		{

		}
         task TMain{
               yield;
  
    SetMovePosition02(GetX,GetArgument, GetArgument/6);
        loop(GetArgument/6){yield;}
           shot;
if(GetX<GetCenterX){
SetAngle(0);
}
else{SetAngle(180);}
SetSpeed(6);
 loop(90){yield;}
 VanishEnemy;

                   }
         sub move{ let x =rand(64, 384);

    SetMovePosition02(x,GetY+80, 30);
        loop(30){yield;}
        
                  }
         task shot{    
let an=0;
         loop{
           CreateShot02(GetX, GetY, 1, an+20,0.1,3, GREEN01, 10);
           CreateShot02(GetX, GetY, 1, an-20,0.1,3, BLUE01, 10);
         an=an+93;
            loop(5){ yield;}

}
                 }
        sub nige{ 

             VanishEnemy;
                }
	}
  
