
	#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(125+125*GetPlayerLife);
    SetCollisionA(GetX, GetY, 24);
    SetCollisionB(GetX, GetY, 24);
   yield;


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

		}
         task TMain{
               yield;
 SetMovePosition02(GetX+30,GetY, 10);
loop(25){yield;}
shot;
   SetMovePosition02(GetX,GetClipMaxY+30, 120);
   loop(120){yield;}        
                    
                nige;
                   }
         sub move{ let x =rand(64, 384);
                   let y =rand(240, 48);
    SetMovePosition02(GetX+90,GetY, 10);
        loop(10){yield;}
        
                  }
         task shot{    
         loop{
           CreateShot02(GetX, GetY, 4, GetAngleToPlayer,0,4, YELLOW12, 0);
           CreateShot02(GetX, GetY, 4, GetAngleToPlayer+30,0,4, ORANGE12, 0);
           CreateShot02(GetX, GetY, 4, GetAngleToPlayer-30,0,4, ORANGE12, 0);

            loop(60){ yield;}}
                 }
        sub nige{ 

             VanishEnemy;
                }
	}
  
