let MainSTG = GetMainStgScriptDirectory;

task PlayDelaySE(se,delay){
        loop(delay){yield;}
        PlaySE(se);
}

task LoadSoundEffects{
	LoadSound(MainSTG~"sound/Shot1.wav");
	LoadSound(MainSTG~"sound/Shot2.wav");
	LoadSound(MainSTG~"sound/Shot3.wav");
	LoadSound(MainSTG~"sound/Shot4.wav");
	LoadSound(MainSTG~"sound/Shot5.wav");
	LoadSound(MainSTG~"sound/Shot6.wav");
	LoadSound(MainSTG~"sound/Laser1.wav");
	LoadSound(MainSTG~"sound/Laser2.wav");
	LoadSound(MainSTG~"sound/Laser3.wav");
	LoadSound(MainSTG~"sound/Laser4.wav");
	LoadSound(MainSTG~"sound/Laser5.wav");
	LoadSound(MainSTG~"sound/Charge1.wav");
	LoadSound(MainSTG~"sound/Charge2.wav");
	LoadSound(MainSTG~"sound/Charge3.wav");
	LoadSound(MainSTG~"sound/Charge4.wav");
	LoadSound(MainSTG~"sound/Weird1.wav");
	LoadSound(MainSTG~"sound/Weird2.wav");
	LoadSound(MainSTG~"sound/Weird3.wav");
	LoadSound(MainSTG~"sound/bright.wav");
	LoadSound(MainSTG~"sound/BulletWave.wav");
	LoadSound(MainSTG~"sound/Eff1.wav");
	LoadSound(MainSTG~"sound/Eff2.wav");
	LoadSound(MainSTG~"sound/Eff3.wav");
	LoadSound(MainSTG~"sound/Eff4.wav");
	LoadSound(MainSTG~"sound/fam.wav");
	LoadSound(MainSTG~"sound/stars.wav");
	LoadSound(MainSTG~"sound/Enep1.wav");
	LoadSound(MainSTG~"sound/Hidden.wav");
	LoadSound(MainSTG~"sound/Sudden.wav");
	LoadSound(MainSTG~"sound/famdie.wav");
	LoadSound(MainSTG~"sound/nonfinish.wav");
}

let se;

task PlaySound(str,w){
	//Boss sounds
	loop(w){yield;}
	if(str == "Shot1"){PlaySE(MainSTG~"sound/Shot1.wav");}
	if(str == "Shot2"){PlaySE(MainSTG~"sound/Shot2.wav");}
	if(str == "Shot3"){PlaySE(MainSTG~"sound/Shot3.wav");}
	if(str == "Shot4"){PlaySE(MainSTG~"sound/Shot4.wav");}
	if(str == "Shot5"){PlaySE(MainSTG~"sound/Shot5.wav");}
	if(str == "Shot6"){PlaySE(MainSTG~"sound/Shot6.wav");}
	if(str == "Laser1"){PlaySE(MainSTG~"sound/Laser1.wav");}
	if(str == "Laser2"){PlaySE(MainSTG~"sound/Laser2.wav");}
	if(str == "Laser3"){PlaySE(MainSTG~"sound/Laser3.wav");}
	if(str == "Laser4"){PlaySE(MainSTG~"sound/Laser4.wav");}
	if(str == "Laser5"){PlaySE(MainSTG~"sound/Laser5.wav");}
	if(str == "Charge1"){PlaySE(MainSTG~"sound/Charge1.wav");}
	if(str == "Charge2"){PlaySE(MainSTG~"sound/Charge2.wav");}
	if(str == "Charge3"){PlaySE(MainSTG~"sound/Charge3.wav");}
	if(str == "Charge4"){PlaySE(MainSTG~"sound/Charge4.wav");}
	if(str == "Weird1"){PlaySE(MainSTG~"sound/Weird1.wav");}
	if(str == "Weird2"){PlaySE(MainSTG~"sound/Weird2.wav");}
	if(str == "Weird3"){PlaySE(MainSTG~"sound/Weird3.wav");}
	if(str == "BulletWave"){PlaySE(MainSTG~"sound/BulletWave.wav");}
	if(str == "bright"){PlaySE(MainSTG~"sound/bright.wav");}
	if(str == "Eff1"){PlaySE(MainSTG~"sound/Eff1.wav");}
	if(str == "Eff2"){PlaySE(MainSTG~"sound/Eff2.wav");}
	if(str == "Eff3"){PlaySE(MainSTG~"sound/Eff3.wav");}
	if(str == "Eff4"){PlaySE(MainSTG~"sound/Eff4.wav");}
	if(str == "fam"){PlaySE(MainSTG~"sound/fam.wav");}
	if(str == "stars"){PlaySE(MainSTG~"sound/stars.wav");}
	if(str == "Enep1"){PlaySE(MainSTG~"sound/Enep1.wav");}
	if(str == "Hidden"){PlaySE(MainSTG~"sound/Hidden.wav");}
	if(str == "Sudden"){PlaySE(MainSTG~"sound/Sudden.wav");}
	if(str == "famdie"){PlaySE(MainSTG~"sound/famdie.wav");}
	if(str == "nonfinish"){PlaySE(MainSTG~"sound/nonfinish.wav");}
}