From 8a3511e5662de9771b07353ff7175c942726c43b Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Mon, 7 Nov 2022 13:21:55 +0100 Subject: [PATCH] play state!! --- buildnumber.txt | 2 +- source/funkin/game/PlayState.hx | 55 +++++++++++++++++---------------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/buildnumber.txt b/buildnumber.txt index 4dedbee1..f0236b52 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -1214 \ No newline at end of file +1215 \ No newline at end of file diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index fb7cb55a..5b86a60c 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1299,8 +1299,6 @@ class PlayState extends MusicBeatState comboSpr.velocity.y -= 150; comboSpr.velocity.x += FlxG.random.int(1, 10); - comboGroup.add(comboSpr); - comboGroup.add(rating); rating.scale.set(event.ratingScale, event.ratingScale); rating.antialiasing = event.ratingAntialiasing; @@ -1313,33 +1311,36 @@ class PlayState extends MusicBeatState var separatedScore:String = Std.string(combo).addZeros(3); - for (i in 0...separatedScore.length) - { - if (combo < 10 && combo != 0) - break; - - var e = separatedScore.charAt(i); - - var numScore:FlxSprite = new FlxSprite((43 * i) - 90, 80).loadGraphic(Paths.image('${event.ratingPrefix}num$e${event.ratingSuffix}')); - numScore.antialiasing = event.numAntialiasing; - numScore.scale.set(event.numScale, event.numScale); - numScore.updateHitbox(); - - numScore.acceleration.y = FlxG.random.int(200, 300); - numScore.velocity.y -= FlxG.random.int(140, 160); - numScore.velocity.x = FlxG.random.float(-5, 5); - - comboGroup.add(numScore); - - FlxTween.tween(numScore, {alpha: 0}, 0.2, { - onComplete: function(tween:FlxTween) + if (combo == 0 || combo >= 10) { + comboGroup.add(comboSpr); + for (i in 0...separatedScore.length) { - comboGroup.remove(numScore, true); - numScore.destroy(); - }, - startDelay: Conductor.crochet * 0.002 - }); + break; + + var e = separatedScore.charAt(i); + + var numScore:FlxSprite = new FlxSprite((43 * i) - 90, 80).loadGraphic(Paths.image('${event.ratingPrefix}num$e${event.ratingSuffix}')); + numScore.antialiasing = event.numAntialiasing; + numScore.scale.set(event.numScale, event.numScale); + numScore.updateHitbox(); + + numScore.acceleration.y = FlxG.random.int(200, 300); + numScore.velocity.y -= FlxG.random.int(140, 160); + numScore.velocity.x = FlxG.random.float(-5, 5); + + comboGroup.add(numScore); + + FlxTween.tween(numScore, {alpha: 0}, 0.2, { + onComplete: function(tween:FlxTween) + { + comboGroup.remove(numScore, true); + numScore.destroy(); + }, + startDelay: Conductor.crochet * 0.002 + }); + } } + comboGroup.add(rating); FlxTween.tween(rating, {alpha: 0}, 0.2, { startDelay: Conductor.crochet * 0.001