
	#Title[氷像]
	#Text[zako]
	#ScriptVersion[2]
	
	script_enemy_main
	{
        let img = "script\某ペンギン\氷山の皇帝.PNG";
        let frame = 0;

      LoadCommonData;
		@Initialize
		{ 
              SetLife(100);

              LoadGraphic(img);

             TMain;
		
		}
			
		@MainLoop
		{
    SetCollisionA(GetX, GetY, 24);
    SetCollisionB(GetX, GetY, 24);
   yield;


		}
		
		@DrawLoop
		{
		   DrawGraphic(GetX, GetY);
		}
			
		@Finalize
		{let Angle=90;
         loop(12){  CreateShot01(GetX, GetY, 4, Angle, AQUA23, 10);Angle=Angle+30;}

           yield;
		}
         task TMain{

Concentration02(10);
    SetInvincibility(40);
loop(40){yield;}
              SetTexture(img);  SetGraphicRect(0, 0, 64, 64);
            loop{   loop(30){yield;}
                    shot;
                 loop(90){yield;}
                    }
              
                   }
         sub move{ let x =rand(64, 384);
                   let y =rand(240, 48);
     SetMovePosition02(x, y, 60);
        loop(60) { yield; }
                  }
         sub shot{     loop(3){
           CreateShot01(GetX, GetY, 3, GetAngleToPlayer, WHITE02, 0);
           CreateShot01(GetX, GetY, 3, GetAngleToPlayer + 30, WHITE02, 0);
           CreateShot01(GetX, GetY, 3, GetAngleToPlayer - 30, WHITE02, 0);
        loop(10) { yield; } }
        loop(30) { yield; } 
                 }

	}
  
