Skip to content

Commit

Permalink
Merge pull request #19 from lotusotho/menubuttonspam-fix
Browse files Browse the repository at this point in the history
fixed spamming issue with the buttons on the story menu
  • Loading branch information
ninjamuffin99 authored Dec 2, 2020
2 parents c70ed68 + ee9d491 commit e1560b5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/StoryMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,19 @@ class StoryMenuState extends MusicBeatState

var movedBack:Bool = false;
var selectedWeek:Bool = false;

var stopspamming:Bool = false;
function selectWeek()
{
if (weekUnlocked[curWeek])
{
FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt);
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;
Expand Down

0 comments on commit e1560b5

Please sign in to comment.