
	#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;
           
                    shot;
                    
                nige;
                   }
         sub move{ let x =rand(64, 384);
                   let y =rand(240, 48);
     SetMovePosition02(GetX, GetY,30);
        loop(30) { yield; }
                  }
         task shot{  loop{   loop(1){
                   CreateShot02(GetX, GetY, 1, GetAngleToPlayer,0.1,5, BLUE02, 0);
           CreateShot01(GetX, GetY, 3, GetAngleToPlayer + 10, RED01, 0);
           CreateShot01(GetX, GetY, 3, GetAngleToPlayer - 10, RED01, 0);
        }
        loop(60) { yield; } 
                 }}
        sub nige{ 
              SetMovePosition02(GetX, GetClipMaxY, 180);
        loop(180) { yield; } 
             VanishEnemy;
                }
	}
  
