script_enemy_main
{
	let gcsd = GetCurrentScriptDirectory;
	let image = GetArgument;

	let bgmx = 0;
	let bgmalpha = 0;

	task bgmMarker
	{
		while(bgmx<90){bgmx++; bgmalpha+=(255/90); yield;}
		loop(60){yield;}
		loop(60){bgmalpha-=(255/60); yield;}
		VanishEnemy;
	}

	@Initialize
	{
		SetLife(1);
		bgmMarker;

		LoadGraphic(image);
	}

	@MainLoop
	{
		yield;
	}

	@DrawLoop
	{
		SetTexture(image);
		SetGraphicRect(0, 0, 500, 36);
		SetGraphicScale(0.5, 0.5);
		SetAlpha(bgmalpha);
		DrawGraphic(260*sin(bgmx), GetClipMaxY-10);
	}

	@Finalize
	{
		DeleteGraphic(image);
	}
}