From aee759d05ba22a00a04ba5a532007394e4f10dd5 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 6 Dec 2021 01:45:45 -0500 Subject: [PATCH] rip my hair out wit these numbers dawg --- source/freeplayStuff/FreeplayScore.hx | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/source/freeplayStuff/FreeplayScore.hx b/source/freeplayStuff/FreeplayScore.hx index ccaa340ad..01dd3d72d 100644 --- a/source/freeplayStuff/FreeplayScore.hx +++ b/source/freeplayStuff/FreeplayScore.hx @@ -13,12 +13,23 @@ class FreeplayScore extends FlxTypedSpriteGroup { var loopNum:Int = group.members.length - 1; var dumbNumb = Std.parseInt(Std.string(val)); + var prevNum:ScoreNum; while (dumbNumb > 0) { - trace(dumbNumb); group.members[loopNum].digit = dumbNumb % 10; + // var funnyNum = group.members[loopNum]; + // prevNum = group.members[loopNum + 1]; + + // if (prevNum != null) + // { + // funnyNum.x = prevNum.x - (funnyNum.width * 0.7); + // } + + // funnyNum.y = (funnyNum.baseY - (funnyNum.height / 2)) + 73; + // funnyNum.x = (funnyNum.baseX - (funnyNum.width / 2)) + 450; // this plus value is hand picked lol! + dumbNumb = Math.floor(dumbNumb / 10); loopNum--; } @@ -29,8 +40,6 @@ class FreeplayScore extends FlxTypedSpriteGroup loopNum--; } - trace(val); - return val; } @@ -61,15 +70,24 @@ class ScoreNum extends FlxSprite if (animation.curAnim != null && animation.curAnim.name != Std.string(val)) { animation.play(Std.string(val), true, false, 0); + updateHitbox(); + + y = (baseY - (height / 2)) + 45; } return val; } + public var baseY:Float = 0; + public var baseX:Float = 0; + public function new(x:Float, y:Float, ?initDigit:Int = 0) { super(x, y); + baseY = y; + baseX = x; + frames = Paths.getSparrowAtlas('noteComboNumbers'); for (i in 0...10)