From 6ac4db48d9c736fb1fa08ad5c4e209f9abf6f018 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 15 Jun 2023 00:12:35 -0400 Subject: [PATCH] Rename combo milestone --- source/funkin/ComboMilestone.hx | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/source/funkin/ComboMilestone.hx b/source/funkin/ComboMilestone.hx index 28aed4560..b72eda2fa 100644 --- a/source/funkin/ComboMilestone.hx +++ b/source/funkin/ComboMilestone.hx @@ -5,14 +5,14 @@ import flixel.group.FlxGroup.FlxTypedGroup; import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup; import flixel.util.FlxTimer; -class ComboCounter extends FlxTypedSpriteGroup +class ComboMilestone extends FlxTypedSpriteGroup { var effectStuff:FlxSprite; var wasComboSetup:Bool = false; var daCombo:Int = 0; - var grpNumbers:FlxTypedGroup; + var grpNumbers:FlxTypedGroup; var onScreenTime:Float = 0; @@ -23,7 +23,7 @@ class ComboCounter extends FlxTypedSpriteGroup this.daCombo = daCombo; effectStuff = new FlxSprite(0, 0); - effectStuff.frames = Paths.getSparrowAtlas('noteCombo'); + effectStuff.frames = Paths.getSparrowAtlas('comboMilestone'); effectStuff.animation.addByPrefix('funny', 'NOTE COMBO animation', 24, false); effectStuff.animation.play('funny'); effectStuff.antialiasing = true; @@ -33,7 +33,7 @@ class ComboCounter extends FlxTypedSpriteGroup effectStuff.setGraphicSize(Std.int(effectStuff.width * 0.7)); add(effectStuff); - grpNumbers = new FlxTypedGroup(); + grpNumbers = new FlxTypedGroup(); // add(grpNumbers); } @@ -41,7 +41,7 @@ class ComboCounter extends FlxTypedSpriteGroup { if (onScreenTime < 0.9) { - new FlxTimer().start((Conductor.crochet / 1000) * 0.25, function(tmr) { + new FlxTimer().start((Conductor.beatLengthMs / 1000) * 0.25, function(tmr) { forceFinish(); }); } @@ -62,14 +62,14 @@ class ComboCounter extends FlxTypedSpriteGroup if (effectStuff.animation.curAnim.curFrame == 18) { - grpNumbers.forEach(function(spr:ComboNumber) { + grpNumbers.forEach(function(spr:ComboMilestoneNumber) { spr.animation.reset(); }); } if (effectStuff.animation.curAnim.curFrame == 20) { - grpNumbers.forEach(function(spr:ComboNumber) { + grpNumbers.forEach(function(spr:ComboMilestoneNumber) { spr.kill(); }); } @@ -86,7 +86,7 @@ class ComboCounter extends FlxTypedSpriteGroup while (daCombo > 0) { - var comboNumber:ComboNumber = new ComboNumber(450 - (100 * loopNum), 20 + 14 * loopNum, daCombo % 10); + var comboNumber:ComboMilestoneNumber = new ComboMilestoneNumber(450 - (100 * loopNum), 20 + 14 * loopNum, daCombo % 10); comboNumber.setGraphicSize(Std.int(comboNumber.width * 0.7)); grpNumbers.add(comboNumber); add(comboNumber); @@ -95,27 +95,17 @@ class ComboCounter extends FlxTypedSpriteGroup daCombo = Math.floor(daCombo / 10); } - - // var comboNumber:ComboNumber = new ComboNumber(420, 0, 0); - - // add to both, in the group just for ez organize/accessing - // grpNumbers.add(comboNumber); - // add(comboNumber); - - // var comboNumber2:ComboNumber = new ComboNumber(420 - 134, 44, 0); - // grpNumbers.add(comboNumber2); - // add(comboNumber2); } } -class ComboNumber extends FlxSprite +class ComboMilestoneNumber extends FlxSprite { public function new(x:Float, y:Float, digit:Int) { super(x - 20, y); var stringNum:String = Std.string(digit); - frames = Paths.getSparrowAtlas('noteComboNumbers'); + frames = Paths.getSparrowAtlas('comboMilestoneNumbers'); animation.addByPrefix(stringNum, stringNum, 24, false); animation.play(stringNum); antialiasing = true;