From 0fd59f5e271e03c8e1cd8fc8173e6a4541fdedd6 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Thu, 26 Nov 2020 19:43:45 +0100 Subject: [PATCH 1/3] fixed spamming issue with the buttons on the story menu --- source/StoryMenuState.hx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 1bdfa86..c87d8e0 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -230,15 +230,23 @@ class StoryMenuState extends MusicBeatState var movedBack:Bool = false; var selectedWeek:Bool = false; - + var stopspamming = false; function selectWeek() { if (weekUnlocked[curWeek]) { - FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt); + if (stopspamming == true) + { + // no more spamming for u hahaha + } + if (stopspamming == false) + { + FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt); - grpWeekText.members[curWeek].week.animation.resume(); - grpWeekCharacters.members[1].animation.play('bfConfirm'); + grpWeekText.members[curWeek].week.animation.resume(); + grpWeekCharacters.members[1].animation.play('bfConfirm'); + stopspamming = true; + } PlayState.storyPlaylist = weekData[curWeek]; PlayState.isStoryMode = true; From 698701a501be5c233a8bdbf54f47c8b04b6b3c0a Mon Sep 17 00:00:00 2001 From: lotusotho <69006987+lotusotho@users.noreply.github.com> Date: Thu, 26 Nov 2020 20:14:35 +0100 Subject: [PATCH 2/3] Update StoryMenuState.hx --- source/StoryMenuState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index c87d8e0..173289d 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -230,7 +230,7 @@ class StoryMenuState extends MusicBeatState var movedBack:Bool = false; var selectedWeek:Bool = false; - var stopspamming = false; + var stopspamming:Bool = false; function selectWeek() { if (weekUnlocked[curWeek]) From 4fca049f2ea76f06bd6144ddee5067d7f18a38f0 Mon Sep 17 00:00:00 2001 From: Lotusotho <69006987+lotusotho@users.noreply.github.com> Date: Tue, 1 Dec 2020 12:53:30 +0100 Subject: [PATCH 3/3] Update StoryMenuState.hx --- source/StoryMenuState.hx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 173289d..d5338b2 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -235,10 +235,6 @@ class StoryMenuState extends MusicBeatState { if (weekUnlocked[curWeek]) { - if (stopspamming == true) - { - // no more spamming for u hahaha - } if (stopspamming == false) { FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt);