#e
#Title[䕄uOpȁv]
#Text[]
#ScriptVersion[2]

script_enemy_main
{//Enemy01
	let count=0;
	let cx=GetCenterX();//STGV[̒SxW擾
	let cy=GetCenterY();//STGV[̒SyW擾
	let imgExRumia=GetCurrentScriptDirectory~"img\ExRumia.png";
	let imgback=GetCurrentScriptDirectory~"img\RyuukaBack.png";
	let angle=0;
	LoadUserShotData(GetCurrentScriptDirectory~"shot.txt");
	@Initialize
	{
		SetScore(30000);
		SetLife(500);
		SetDamageRate(10,5);
		SetTimer(90);
	
		SetGraphicRect(1,1,64,64);
		SetInvincibility(600);
		
		LoadGraphic(imgExRumia);	
		LoadGraphic(imgback);

		SetMovePosition02(cx,cy-120,60);
		Concentration01(150);
		CutIn(YOUMU,"䕄uOpȁv",0,0,0,0,0);
	}
	@MainLoop
	{
		let s=0;
		let base =GetAngleToPlayer;

		SetCollisionA(GetX(),GetY(),24);
		SetCollisionB(GetX(),GetY(),24);
		SetShotAutoDeleteClip(512,512,512,512);

		if(count>=180)
		{
			if(count%3==0)
			{	

					angle=0;
					SetShotDirectionType(SEQUENCE);
					CreateShotA(s,cx,cy,0);	
					SetShotDataA(s,0,6,90,0,0,2,78);
					SetShotDataA(s,10,6,120,0,0,3,78);
					SetShotDataA(s,30,6,120,0,0,3,78);
					SetShotDataA(s,60,6,120,0,0,3,78);
					SetShotDataA(s,100,6,120,0,0,3,78);
					SetShotDataA(s,150,6,120,0,0,3,78);
					SetShotDataA(s,210,6,120,0,0,3,78);
					SetShotDataA(s,280,6,120,0,0,3,78);
					SetShotDataA(s,360,6,120,0,0,3,78);
					SetShotDataA(s,450,6,120,0,0,3,78);
					SetShotDataA(s,550,2,rand(90,270),0,0,3,78);
					FireShot(s)


			}
			if(count%3==0)
			{

					angle=0;
					SetShotDirectionType(SEQUENCE);
					CreateShotA(s,cx,cy,0);	
					SetShotDataA(s,0,6,90,0,0,2,BLUE12);
					SetShotDataA(s,10,6,120,0,0,3,BLUE12);
					SetShotDataA(s,30,6,120,0,0,3,BLUE12);
					SetShotDataA(s,60,6,120,0,0,3,BLUE12);
					SetShotDataA(s,100,6,120,0,0,3,BLUE12);
					SetShotDataA(s,150,6,120,0,0,3,BLUE12);
					SetShotDataA(s,210,6,120,0,0,3,BLUE12);
					SetShotDataA(s,280,6,120,0,0,3,BLUE12);
					SetShotDataA(s,360,6,120,0,0,3,BLUE12);
					SetShotDataA(s,450,2,rand(270,90),0,0,3,BLUE12);
					FireShot(s)


			}
			if(count%3==0)
			{

					angle=0;
					SetShotDirectionType(SEQUENCE);
					CreateShotA(s,cx,cy,0);	
					SetShotDataA(s,0,6,90,0,0,2,BLUE12);
					SetShotDataA(s,10,6,120,0,0,3,BLUE12);
					SetShotDataA(s,30,6,120,0,0,3,BLUE12);
					SetShotDataA(s,60,6,120,0,0,3,BLUE12);
					SetShotDataA(s,100,6,120,0,0,3,BLUE12);
					SetShotDataA(s,150,6,120,0,0,3,BLUE12);
					SetShotDataA(s,210,6,120,0,0,3,BLUE12);
					SetShotDataA(s,280,6,120,0,0,3,BLUE12);
					SetShotDataA(s,360,2,rand(180,0),0,0,3,BLUE12);
					FireShot(s)
			}
		}
	count++;

	}
	@Finalize
	{//ǂ݂񂾃t@C폜

	}
	@DrawLoop
	{
		if(count<270){SetGraphicRect(64,64,127,127)};
		if(count>=270){SetGraphicRect(1,1,64,64);}
		SetAlpha(255);
		SetTexture(imgExRumia);
		DrawGraphic(GetX(),GetY());
	}
}