variable duplication fix

This commit is contained in:
Yoshman29
2022-12-28 17:35:11 +01:00
parent 14a90c0fb9
commit b92e0ec4b7
3 changed files with 1 additions and 9 deletions
-1
View File
@@ -66,7 +66,6 @@ class FreeplayState extends MusicBeatState
// Updating Discord Rich Presence
DiscordClient.changePresence("In the Menus", null);
#end
StoryMenuState.playStoryMode = false;
// LOAD CHARACTERS
+1 -6
View File
@@ -148,12 +148,7 @@ class PauseSubState extends MusicBeatSubstate
case "Options":
FlxG.switchState(new OptionsMenu(true));
case "Exit to menu":
if(StoryMenuState.playStoryMode){
FlxG.switchState(new StoryMenuState());
}
else{
FlxG.switchState(new FreeplayState());
}
FlxG.switchState(PlayState.isStoryMode ? new StoryMenuState() : new FreeplayState());
FlxG.sound.playMusic(Paths.music('freakyMenu'));
}
-2
View File
@@ -43,12 +43,10 @@ class StoryMenuState extends MusicBeatState {
public var characterSprites:FlxTypedGroup<MenuCharacterSprite>;
public var charFrames:Map<String, FlxFramesCollection> = [];
public static var playStoryMode:Bool;
public override function create() {
super.create();
loadXMLs();
StoryMenuState.playStoryMode = true;
persistentUpdate = persistentDraw = true;
// WEEK INFO