Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
i think i fixed the stats not resetting
Browse files Browse the repository at this point in the history
  • Loading branch information
RadiantCorium committed Jun 11, 2022
1 parent 5c118e1 commit 23b7779
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
21 changes: 11 additions & 10 deletions source/states/gameplay/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1767,11 +1767,7 @@ class PlayState extends MusicBeatState
vocals.stop();
FlxG.sound.music.stop();

misses = 0;
sicks = 0;
goods = 0;
bads = 0;
shits = 0;
resetShit();

openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));

Expand Down Expand Up @@ -1976,11 +1972,7 @@ class PlayState extends MusicBeatState
{
trace('WENT BACK TO FREEPLAY??');
FlxG.switchState(new RatingState(misses, sicks, goods, bads, shits, new StoryMenuState()));
misses = 0;
sicks = 0;
goods = 0;
bads = 0;
shits = 0;
resetShit();
}
}

Expand Down Expand Up @@ -2748,4 +2740,13 @@ class PlayState extends MusicBeatState
}

var curLight:Int = 0;

public static function resetShit()
{
misses = 0;
sicks = 0;
goods = 0;
bads = 0;
shits = 0;
}
}
7 changes: 2 additions & 5 deletions source/states/substates/PauseSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,10 @@ class PauseSubState extends MusicBeatSubstate
case "Resume":
returnToGame();
case "Restart Song":
PlayState.resetShit();
FlxG.resetState();
case "Exit to menu":
PlayState.misses = 0;
PlayState.sicks = 0;
PlayState.goods = 0;
PlayState.bads = 0;
PlayState.shits = 0;
PlayState.resetShit();
FlxG.switchState(new MainMenuState());
}
}
Expand Down

0 comments on commit 23b7779

Please sign in to comment.