#東方弾幕風[Plural]
#ScriptVersion[3]
#Title[" "]
#Text["Congratulation! You've found a Hidden Eika Script."]
#Background["./background/Default_Background.txt"]
#System["./system/Default_System.txt"]

#include"./Hidden_Select.txt"

let objBGM;
@Initialize
{
	TPlural();
}

@Event
{
	alternative(GetEventType())
	case(EV_PAUSE_ENTER)
	{
		ObjSound_Stop(objBGM);
	}
	case(EV_PAUSE_LEAVE)
	{
		ObjSound_Play(objBGM);
	}
}

@MainLoop
{
	yield;
}

task TPlural
{
	objBGM = ObjSound_Create();
	TMenu;
	let dir = GetCurrentScriptDirectory();
	ObjSound_Load(objBGM, dir ~ "BGM.mp3");
	ObjSound_SetSoundDivision(objBGM, SOUND_BGM);
	ObjSound_SetRestartEnable(objBGM, true);
	ObjSound_SetLoopEnable(objBGM, true);
	ObjSound_SetLoopTime(objBGM, 50.2, 128.8);
	//ObjSound_SetLoopTime(objBGM, 100.3, 225.7);
	ObjSound_Play(objBGM);
	let obj = ObjEnemyBossScene_Create();
	ObjEnemyBossScene_Add(obj, 0, dir ~ "EikaR01Non.txt");
	ObjEnemyBossScene_Add(obj, 0, dir ~ "EikaR01Spell.txt");
	ObjEnemyBossScene_Add(obj, 1, dir ~ "EikaR02Non.txt");
	ObjEnemyBossScene_Add(obj, 1, dir ~ "EikaR02Spell.txt");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "EikaR03Non.txt");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "EikaR04Spell.txt");
	ObjEnemyBossScene_LoadInThread(obj);
	ObjEnemyBossScene_Regist(obj);

	while(!Obj_IsDeleted(obj)){ yield; }

	CloseScript(GetOwnScriptID());
}

