
script_enemy_main
{
	let count=0;
	let count2=0;
	let cx=GetCenterX();
	let img=GetCurrentScriptDirectory~"img\dot-kaze-ti2.png";
	let sh00=GetCurrentScriptDirectory~"\se\Shot00.wav";
	let mm=0;
	LoadUserShotData(GetCurrentScriptDirectory~".\shot_All.txt");
	let ang=0;
	@Initialize
	{
		SetLife(2500);
		SetTimer(37);
		SetDamageRate(100,70);
		SetInvincibility(150);
		SetNormPoint(-1);
		LoadGraphic(img);
		SetShotAutoDeleteClip(8,8,8,8);
		SetMovePosition02(cx,120,60);

	}

	@MainLoop
	{
		SetCollisionA(GetX(),GetY(),38);
		SetCollisionB(GetX(),GetY(),24);
		if (count==20) {
			SetColor(128,0,255);
			Concentration01(105);
			PlaySE(GetCurrentScriptDirectory~"\se\push02.wav");
		}
		if (count>=100&&count%3==0) {
			PlaySE(sh00);
			SetCollisionB(GetX(),GetY(),55);
			ascent( let t in 0..24 ) {
				CreateShot02(GetX()+55*sin(mm+t*6),GetY()-5-38*cos(mm+t*15),6.5,mm+t*22,-0.07,2,135,0);
			}
			ascent( let t in 0..12 ) {
				CreateShot02(GetX()+55*sin(mm+t*80),GetY()-5-38*cos(mm+t*30),9,mm+t*30,-0.2,-7,134,0);
			}
		}
		count++;
		count2++;
		mm+=5+2*sin(count*2);
	}

	@Finalize
	{
		DeleteGraphic(img);
		SetShotAutoDeleteClip(32,32,32,32);
	}

	@DrawLoop
	{
		SetTexture(img);
		SetAlpha(255);
		SetColor(255,255,255);
		SetRenderState(ALPHA);
		SetGraphicScale(1,1);
		if (GetSpeed()<0.1) {
			SetGraphicRect(128,64,192,128);
		}
		if (GetSpeed()>=0.1||count>0) {
			if (count2%3==0) {
				SetGraphicRect(0,128,128,256);
			}
			if (count2%3==1) {
				SetGraphicRect(0,256,128,384);
			}
			if (count2%3==2) {
				SetGraphicRect(0,384,128,512);
			}
		}
		DrawGraphic(GetX(),GetY());
	}
}
