#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["Skylight Overseer - Unreal"]
#Text["Script by: Mr.Gaberson"]
#Background["./Background.txt"] 

//#BGM ["./BGM/resurrectedreplayer.mp3"]
#Player["./players/Tsubakura/Tsubakura.dnh"]


let dir = GetCurrentScriptDirectory();

@Event{
	yield;
}

@Initialize{
	TPlural;
	TBGM;
}

@MainLoop{
	yield;
	SetPlayerLife(99);
}

//wait -- --- -----
function wait(n){loop(n){yield;}}

task TBGM{
	let BGM_Sound = dir ~ "BGM/BGM.ogg";

	let BGM_Music = ObjSound_Create;
	ObjSound_Load(BGM_Music, BGM_Sound);
	ObjSound_SetSoundDivision(BGM_Music, SOUND_BGM);
	ObjSound_SetLoopEnable(BGM_Music, true);
	ObjSound_SetLoopSampleCount(BGM_Music, 1111465, 10637065);
	ObjSound_Play(BGM_Music);
	
}

task TPlural{
    let obj = ObjEnemyBossScene_Create();
    ObjEnemyBossScene_Add(obj, 0, dir ~ "N01-4Non1U.cs");
	ObjEnemyBossScene_Add(obj, 0, dir ~ "S01-4Spell1U.cs");
	
	ObjEnemyBossScene_Add(obj, 1, dir ~ "N02-4Non2U.cs");
	ObjEnemyBossScene_Add(obj, 1, dir ~ "S02-4Spell2U.cs");
	
	ObjEnemyBossScene_Add(obj, 2, dir ~ "N03-4Non3U.cs");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "S03-4Spell3U.cs");
	
	ObjEnemyBossScene_Add(obj, 3, dir ~ "S04-4Spell4U.cs");

	ObjEnemyBossScene_LoadInThread(obj);
    ObjEnemyBossScene_Regist(obj);
	while(!Obj_IsDeleted(obj)){
        yield;
    }
    CloseScript(GetOwnScriptID());
}