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

#include"./Practice_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
{
	let dir = GetCurrentScriptDirectory();
	objBGM = ObjSound_Create();
	TMenu;
	ObjSound_Load(objBGM, dir ~ "BGM1.mp3");
	ObjSound_SetSoundDivision(objBGM, SOUND_BGM);
	ObjSound_SetRestartEnable(objBGM, true);
	ObjSound_SetLoopEnable(objBGM, true);
	ObjSound_SetLoopTime(objBGM, 100.3, 225.7);
	ObjSound_Play(objBGM);
	let obj = ObjEnemyBossScene_Create();
	ObjEnemyBossScene_Add(obj, 0, dir ~ "Koishi01Non.txt");
	ObjEnemyBossScene_Add(obj, 0, dir ~ "Koishi01Spell.txt");
	ObjEnemyBossScene_Add(obj, 1, dir ~ "Koishi02Non.txt");
	ObjEnemyBossScene_Add(obj, 1, dir ~ "Koishi02Spell.txt");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "Koishi03Non.txt");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "Koishi04Spell.txt");
	ObjEnemyBossScene_Add(obj, 3, dir ~ "Koishi05Spell.txt");
	ObjEnemyBossScene_Add(obj, 4, dir ~ "Koishi06Spell.txt");
	ObjEnemyBossScene_Add(obj, 5, dir ~ "Koishi07Spell.txt");
	ObjEnemyBossScene_Add(obj, 6, dir ~ "Koishi08Spell.txt");
	ObjEnemyBossScene_Add(obj, 6, dir ~ "Koishi09Spell.txt");
	ObjEnemyBossScene_LoadInThread(obj);
	ObjEnemyBossScene_Regist(obj);

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

	CloseScript(GetOwnScriptID());
}

