fix preloaded versions

This commit is contained in:
George FunBook
2021-02-11 13:14:02 -06:00
parent 8b53e0c0b9
commit da69d16d80
3 changed files with 53 additions and 32 deletions

View File

@ -152,7 +152,7 @@ class LoadingState extends MusicBeatState
static function getNextState(target:FlxState, stopMusic = false):FlxState
{
Paths.setCurrentLevel("week" + PlayState.storyWeek);
#if js
#if NO_PRELOAD_ALL
var loaded = isSoundLoaded(getSongPath())
&& (!PlayState.SONG.needsVoices || isSoundLoaded(getVocalPath()))
&& isLibraryLoaded("shared");
@ -166,7 +166,7 @@ class LoadingState extends MusicBeatState
return target;
}
#if js
#if NO_PRELOAD_ALL
static function isSoundLoaded(path:String):Bool
{
return Assets.cache.hasSound(path);