cool pause music

This commit is contained in:
Cameron Taylor
2020-11-20 04:21:04 -08:00
parent f40b4df571
commit 5b46515e5b
5 changed files with 27 additions and 3 deletions

View File

@ -588,6 +588,7 @@ class PlayState extends MusicBeatState
private var paused:Bool = false;
var startedCountdown:Bool = false;
var canPause:Bool = true;
override public function update(elapsed:Float)
{
@ -595,7 +596,7 @@ class PlayState extends MusicBeatState
scoreTxt.text = "Score:" + songScore;
if (FlxG.keys.justPressed.ENTER && startedCountdown)
if (FlxG.keys.justPressed.ENTER && startedCountdown && canPause)
{
persistentUpdate = false;
persistentDraw = true;
@ -830,6 +831,8 @@ class PlayState extends MusicBeatState
function endSong():Void
{
canPause = false;
Highscore.saveScore(SONG.song, songScore, storyDifficulty);
if (isStoryMode)