if optimize mode is on, then remove assets and free memory

This commit is contained in:
KadeDeveloper
2021-08-13 17:20:55 -07:00
parent c3020d9dff
commit 5eb3a66b0c
9 changed files with 49 additions and 0 deletions

View File

@@ -218,6 +218,7 @@ class ResultsScreen extends FlxSubState
}
else
FlxG.switchState(new FreeplayState());
PlayState.instance.clean();
}
if (FlxG.keys.justPressed.F1 && !PlayState.loadRep)
@@ -288,6 +289,7 @@ class ResultsScreen extends FlxSubState
PlayState.isStoryMode = false;
PlayState.storyDifficulty = PlayState.rep.replay.songDiff;
LoadingState.loadAndSwitchState(new PlayState());
PlayState.instance.clean();
}
if (FlxG.keys.justPressed.F2 && !PlayState.loadRep)
@@ -324,6 +326,7 @@ class ResultsScreen extends FlxSubState
PlayState.isStoryMode = false;
PlayState.storyDifficulty = PlayState.storyDifficulty;
LoadingState.loadAndSwitchState(new PlayState());
PlayState.instance.clean();
}
super.update(elapsed);