#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["luigi boss fight"]
#Text[test6] 
#include "script/sample/gamejam/my_system/Default_ShotConst2.txt"
#System["script/sample/gamejam/my_system/My_system.txt"]
let objBGM = ObjSound_Create();

@Event{
}

@Initialize{
PlayTrack;
    TPlural;
}
@MainLoop{

    yield;
}

function wait(w) { loop(w) { yield; } }

task TPlural{
    let dir = GetCurrentScriptDirectory();
    let obj = ObjEnemyBossScene_Create();
	ObjEnemyBossScene_Add(obj, 0, dir ~ "./appearluigi.txt");
ObjEnemyBossScene_Add(obj, 1, dir ~ "./dialog2.txt");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "./Spellcard1.txt");
	ObjEnemyBossScene_Add(obj, 3, dir ~ "./Spellcard2.txt");
ObjEnemyBossScene_Add(obj, 4, dir ~ "./spellcard3.txt");


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

   task PlayTrack{

	ObjSound_Load(objBGM, GetCurrentScriptDirectory() ~ "./BGM/luigi.ogg");
	ObjSound_SetSoundDivision(objBGM, SOUND_BGM);
	ObjSound_SetLoopEnable(objBGM, true);
	ObjSound_SetLoopTime(objBGM, 0.43, 312);

	ObjSound_Play(objBGM);
    }
