#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["Full Boss Fight"]
#Text["Fight all the things"]

//#BGM["./Test.ogg"]

@Initialize
{
	Sound(GetCurrentScriptDirectory ~ "./se/Donkey Kong Country 2 - Stickerbrush Symphony.mp3");
	TPlural();
}

@MainLoop
{
	yield;
}

@Finalize
{
}


task TPlural
{
	let dir = GetCurrentScriptDirectory();

	
	let obj = ObjEnemyBossScene_Create();
	ObjEnemyBossScene_Add(obj, 0, dir ~ "KONG.dnh");
	ObjEnemyBossScene_Add(obj, 0, dir ~ "Non1.cs");
	ObjEnemyBossScene_Add(obj, 0, dir ~ "DiddyRoll.dnh");
	ObjEnemyBossScene_Add(obj, 0, dir ~ "Non2.cs");
	ObjEnemyBossScene_Add(obj, 0, dir ~ "BarrelBlast.cs");
	//ObjEnemyBossScene_Add(obj, 0, dir ~ "Barrel.txt");
	
	ObjEnemyBossScene_LoadInThread(obj);
	ObjEnemyBossScene_Regist(obj);

	while(!Obj_IsDeleted(obj))
	{
		yield;
	}
	let kkdkSE = CreateSFX(GetCurrentScriptDirectory ~ "./se/Golden Banana Acquisition.mp3",90);
	ObjSound_Play(kkdkSE);

	CloseScript(GetOwnScriptID());
}

function CreateSFX(path, volume){
    let obj = ObjSound_Create();
    ObjSound_Load(obj, path);
    ObjSound_SetSoundDivision(obj, SOUND_SE);
    ObjSound_SetVolumeRate(obj, volume);
    return obj;
}

function Sound(path){ //For music. 
     let obj = ObjSound_Create;
     ObjSound_Load(obj,path);
     ObjSound_SetSoundDivision(obj, SOUND_BGM);
     ObjSound_SetRestartEnable(obj, true);
     ObjSound_SetLoopEnable(obj, true);
    // ObjSound_SetLoopTime(obj, 0,300);
     ObjSound_Play(obj);
     ObjSound_SetVolumeRate(obj,78);
     return obj;
 }
