

script_enemy_main
{
	let cx = GetCenterX();
	let cy = GetCenterY();
	let count = 0;
	let count2 = 0;
	let img=GetCurrentScriptDirectory~"img\dot-kaze-ti2.png";
	@Initialize()
	{
		SetLife(1);
		ForbidShot(true);
		ForbidBomb(true);
		SetGraphicRect(0,0,128,128);
		CollectItems;
	}

	@MainLoop()
	{
		count2++;
		SetNormPoint(-1);
		if (OnEvent()==true) {
			break;
		}
		if (GetSpeed!=0) {
			break;
		}
		if (count == 1)
		{
		}
		if (count == 2)
		{
			SetMovePosition02(cx+1,145,80);
			CreateEventFromScript("B");
		}
		if (count == 3)
		{
			VanishEnemy;
		}
		count++;
	}

	@DrawLoop
	{
		SetTexture(img);
		SetAlpha(255);
		SetColor(255,255,255);
		SetRenderState(ALPHA);
		SetGraphicScale(1,1);
		if (GetSpeed()<0.2) {
			SetGraphicRect(128,64,192,128);
		}
		if (GetSpeed()>=0.2) {
			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());
	}

	@Finalize() {
		ForbidShot(false);
		ForbidBomb(false);
	}
}







script_event B
{
	let count = 0;
	@Initialize
	{
	}

	@MainLoop
	{count++;
	 TextOut("\c[WHITE]@");
	 End();
	}

	@Finalize
	{

	}
}

