1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-25 08:13:45 +00:00

rip my hair out wit these numbers dawg

This commit is contained in:
Cameron Taylor 2021-12-06 01:45:45 -05:00
parent 3c1ed09994
commit aee759d05b

View file

@ -13,12 +13,23 @@ class FreeplayScore extends FlxTypedSpriteGroup<ScoreNum>
{
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<ScoreNum>
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)