add Paths asset name helper

This commit is contained in:
George FunBook
2021-02-08 15:34:48 -06:00
parent a4b79abc5a
commit d16091dc24
21 changed files with 199 additions and 142 deletions

View File

@ -40,7 +40,7 @@ class GameOverSubstate extends MusicBeatSubstate
camFollow = new FlxObject(bf.getGraphicMidpoint().x, bf.getGraphicMidpoint().y, 1, 1);
add(camFollow);
FlxG.sound.play('assets/sounds/fnf_loss_sfx' + stageSuffix + TitleState.soundExt);
FlxG.sound.play(Paths.sound('fnf_loss_sfx' + stageSuffix));
Conductor.changeBPM(100);
// FlxG.camera.followLerp = 1;
@ -77,7 +77,7 @@ class GameOverSubstate extends MusicBeatSubstate
if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.finished)
{
FlxG.sound.playMusic('assets/music/gameOver' + stageSuffix + TitleState.soundExt);
FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix));
}
if (FlxG.sound.music.playing)
@ -102,7 +102,7 @@ class GameOverSubstate extends MusicBeatSubstate
isEnding = true;
bf.playAnim('deathConfirm', true);
FlxG.sound.music.stop();
FlxG.sound.play('assets/music/gameOverEnd' + stageSuffix + TitleState.soundExt);
FlxG.sound.play(Paths.music('gameOverEnd' + stageSuffix));
new FlxTimer().start(0.7, function(tmr:FlxTimer)
{
FlxG.camera.fade(FlxColor.BLACK, 2, false, function()