1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-01-26 06:37:23 +00:00

Fix some display issues with the clear percent in the results screen.

This commit is contained in:
EliteMasterEric 2024-06-05 00:40:14 -04:00
parent 66d86a6969
commit 5dda95c69b
2 changed files with 13 additions and 6 deletions

View file

@ -229,7 +229,7 @@ class InitState extends FlxState
tallies:
{
sick: 130,
good: 70,
good: 60,
bad: 69,
shit: 69,
missed: 69,

View file

@ -35,7 +35,7 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
super(x, y);
flashShader = new PureColor(FlxColor.WHITE);
flashShader.colorSet = true;
flashShader.colorSet = false;
curNumber = startingNumber;
@ -54,10 +54,7 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
*/
public function flash(enabled:Bool):Void
{
for (member in members)
{
member.shader = enabled ? flashShader : null;
}
flashShader.colorSet = enabled;
}
var tmr:Float = 0;
@ -98,6 +95,7 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
var yPos = (digitIndex - 1 + digitOffset) * (digitHeightOffset * this.scale.y);
yPos += small ? 0 : 72;
trace('[COUNTER] Drawing digit ${num}');
if (digitIndex >= members.length)
{
// Three digits = LLR because the 1 and 0 won't be the same anyway.
@ -105,6 +103,8 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
// var variant:Bool = (seperatedScore.length % 2 != 0) ? (digitIndex % 2 == 0) : (digitIndex % 2 == 1);
var numb:ClearPercentNumber = new ClearPercentNumber(xPos, yPos, num, variant, this.small);
numb.scale.set(this.scale.x, this.scale.y);
numb.shader = flashShader;
numb.visible = true;
add(numb);
}
else
@ -113,8 +113,15 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
// Reset the position of the number
members[digitIndex].x = xPos + this.x;
members[digitIndex].y = yPos + this.y;
members[digitIndex].visible = true;
}
}
trace('[COUNTER] Members: ${members.length}, expected members: ${seperatedScore.length + 1}');
for (ind in (seperatedScore.length + 1)...(members.length))
{
trace('Hiding digit ${ind}');
members[ind].visible = false;
}
}
}