the acquired combo will now be saved and seen in freeplay

This commit is contained in:
Lucky56
2021-06-17 23:19:34 +02:00
parent 391a8d8984
commit af627cc241
3 changed files with 75 additions and 0 deletions

View File

@ -26,9 +26,11 @@ class FreeplayState extends MusicBeatState
var curDifficulty:Int = 1;
var scoreText:FlxText;
var comboText:FlxText;
var diffText:FlxText;
var lerpScore:Int = 0;
var intendedScore:Int = 0;
var combo:String = '';
private var grpSongs:FlxTypedGroup<Alphabet>;
private var curPlaying:Bool = false;
@ -106,6 +108,10 @@ class FreeplayState extends MusicBeatState
diffText.font = scoreText.font;
add(diffText);
comboText = new FlxText(diffText.x + 100, diffText.y, 0, "", 24);
comboText.font = diffText.font;
add(comboText);
add(scoreText);
changeSelection();
@ -176,6 +182,7 @@ class FreeplayState extends MusicBeatState
lerpScore = intendedScore;
scoreText.text = "PERSONAL BEST:" + lerpScore;
comboText.text = combo + '\n';
var upP = controls.UP_P;
var downP = controls.DOWN_P;
@ -242,6 +249,7 @@ class FreeplayState extends MusicBeatState
#if !switch
intendedScore = Highscore.getScore(songHighscore, curDifficulty);
combo = Highscore.getCombo(songHighscore, curDifficulty);
#end
switch (curDifficulty)
@ -283,6 +291,7 @@ class FreeplayState extends MusicBeatState
#if !switch
intendedScore = Highscore.getScore(songHighscore, curDifficulty);
combo = Highscore.getCombo(songHighscore, curDifficulty);
// lerpScore = 0;
#end