From f6ef24c3028917ffa32a2a5bcd9d7690d0a7556c Mon Sep 17 00:00:00 2001 From: Leo40Git <7997354+Leo40Git@users.noreply.github.com> Date: Sun, 6 Jun 2021 17:25:00 +0300 Subject: [PATCH] Fix combo counter for 0-9 combos --- source/PlayState.hx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 9c24a1d..6895c89 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2729,8 +2729,14 @@ class PlayState extends MusicBeatState var comboSplit:Array = (combo + "").split(''); - if (comboSplit.length == 2) - seperatedScore.push(0); // make sure theres a 0 in front or it looks weird lol! + // make sure we have 3 digits to display (looks weird otherwise lol) + if (comboSplit.length == 1) + { + seperatedScore.push(0); + seperatedScore.push(0); + } + else if (comboSplit.length == 2) + seperatedScore.push(0); for(i in 0...comboSplit.length) { @@ -2762,8 +2768,7 @@ class PlayState extends MusicBeatState numScore.velocity.y -= FlxG.random.int(140, 160); numScore.velocity.x = FlxG.random.float(-5, 5); - if (combo >= 10 || combo == 0) - add(numScore); + add(numScore); FlxTween.tween(numScore, {alpha: 0}, 0.2, { onComplete: function(tween:FlxTween)