	#搶曽抏枊晽
	#Title[昘憸乽僼僅乕僆僽僶僇僀儞僪乿]
	#Text[巐曽偐傜嘓]
	#Image[]
	#ScriptVersion[2]
	#BGM[.\BGM3.mp3]
	#Player[FREE]
	script_enemy_main
	{
		let c=0;
		let cm=0;
		let angle=90;
		let angle2=GetAngleToPlayer()-20;
		let cx=GetCenterX();
		let cy=GetCenterY();
		@Initialize
		{
			CutIn(YOUMU, "昘憸乽僼僅乕僆僽僶僇僀儞僪乿", "", 0, 0, 0, 0);
			SetLife(4000);
			SetMovePosition02(cx,60,60);
			SetTimer(30);
        		SetScore(4000000);
			SetGraphicRect(1,1,48,48);
			LoadGraphic("script\img\2127578.png");
		}
			
		@MainLoop
		{
			
			


			if(c==60)
			{				
				loop(36){
					CreateShot01(GetX(),GetY(),3,angle,BLUE12,0);
					angle+=10;
					c=0;
					}
				loop(36){
					CreateShot01(GetX()+130,GetY()+20,2,angle,BLUE12,0);
					angle+=10;
					c=0;
					}	
				loop(36){
					CreateShot01(GetX()-130,GetY()+20,2,angle,BLUE12,0);
					angle+=10;
					c=0;
					}	
				loop(36){
					CreateShot01(cx,GetClipMaxY-20,1,angle,BLUE12,0);
					angle+=10;
					c=0;
					}	
			}
			
			if(cm==60) 
			{
	    			if(GetX()<=GetPlayerX())
	    				{SetMovePosition02(GetX()+50,rand(50,100),60);}
	   	 		else if(GetX()>GetPlayerX())
	    				{SetMovePosition02(GetX()-50,rand(50,100),60);}
	    				cm=0;
			}	
				SetCollisionA(GetX(),GetY(),32);
				SetCollisionB(GetX(),GetY(),24);
				SetCollisionA(GetX()+130,GetY()+20,32);
				SetCollisionA(GetX()-130,GetY()+20,32);
				SetCollisionA(cx,GetClipMaxY-20,32);		
				c++;
				cm++;
		}

		@DrawLoop
		{
			
			SetTexture("script\img\2127578.png");
			DrawGraphic(GetX(),GetY());
			DrawGraphic(GetX()+130,GetY()+20);
			DrawGraphic(GetX()-130,GetY()+20);
			DrawGraphic(cx,GetClipMaxY-20);
		}
		
		@Finalize
		{
			loop(24) {
        		let x = GetX + rand(-64, 64);
       	 		let y = GetY + rand(-64, 64);
        		CreateItem(ITEM_SCORE, x, y);
			}
			DeleteGraphic("script\img\2127578.png");
		}
	}
  
