mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-25 14:46:43 +00:00
Merge pull request #599 from FunkinCrew/bugfix/results-percent-display
Fix some display issues with the clear percent in the results screen.
This commit is contained in:
commit
88248233b0
|
@ -229,7 +229,7 @@ class InitState extends FlxState
|
||||||
tallies:
|
tallies:
|
||||||
{
|
{
|
||||||
sick: 130,
|
sick: 130,
|
||||||
good: 70,
|
good: 60,
|
||||||
bad: 69,
|
bad: 69,
|
||||||
shit: 69,
|
shit: 69,
|
||||||
missed: 69,
|
missed: 69,
|
||||||
|
|
|
@ -35,7 +35,7 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
super(x, y);
|
super(x, y);
|
||||||
|
|
||||||
flashShader = new PureColor(FlxColor.WHITE);
|
flashShader = new PureColor(FlxColor.WHITE);
|
||||||
flashShader.colorSet = true;
|
flashShader.colorSet = false;
|
||||||
|
|
||||||
curNumber = startingNumber;
|
curNumber = startingNumber;
|
||||||
|
|
||||||
|
@ -54,10 +54,7 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
*/
|
*/
|
||||||
public function flash(enabled:Bool):Void
|
public function flash(enabled:Bool):Void
|
||||||
{
|
{
|
||||||
for (member in members)
|
flashShader.colorSet = enabled;
|
||||||
{
|
|
||||||
member.shader = enabled ? flashShader : null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var tmr:Float = 0;
|
var tmr:Float = 0;
|
||||||
|
@ -98,6 +95,7 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
var yPos = (digitIndex - 1 + digitOffset) * (digitHeightOffset * this.scale.y);
|
var yPos = (digitIndex - 1 + digitOffset) * (digitHeightOffset * this.scale.y);
|
||||||
yPos += small ? 0 : 72;
|
yPos += small ? 0 : 72;
|
||||||
|
|
||||||
|
trace('[COUNTER] Drawing digit ${num}');
|
||||||
if (digitIndex >= members.length)
|
if (digitIndex >= members.length)
|
||||||
{
|
{
|
||||||
// Three digits = LLR because the 1 and 0 won't be the same anyway.
|
// 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 variant:Bool = (seperatedScore.length % 2 != 0) ? (digitIndex % 2 == 0) : (digitIndex % 2 == 1);
|
||||||
var numb:ClearPercentNumber = new ClearPercentNumber(xPos, yPos, num, variant, this.small);
|
var numb:ClearPercentNumber = new ClearPercentNumber(xPos, yPos, num, variant, this.small);
|
||||||
numb.scale.set(this.scale.x, this.scale.y);
|
numb.scale.set(this.scale.x, this.scale.y);
|
||||||
|
numb.shader = flashShader;
|
||||||
|
numb.visible = true;
|
||||||
add(numb);
|
add(numb);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -113,8 +113,15 @@ class ClearPercentCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
// Reset the position of the number
|
// Reset the position of the number
|
||||||
members[digitIndex].x = xPos + this.x;
|
members[digitIndex].x = xPos + this.x;
|
||||||
members[digitIndex].y = yPos + this.y;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ class DJBoyfriend extends FlxAtlasSprite
|
||||||
|
|
||||||
var gotSpooked:Bool = false;
|
var gotSpooked:Bool = false;
|
||||||
|
|
||||||
static final SPOOK_PERIOD:Float = 120.0;
|
static final SPOOK_PERIOD:Float = 60.0;
|
||||||
static final TV_PERIOD:Float = 180.0;
|
static final TV_PERIOD:Float = 120.0;
|
||||||
|
|
||||||
// Time since dad last SPOOKED you.
|
// Time since dad last SPOOKED you.
|
||||||
var timeSinceSpook:Float = 0;
|
var timeSinceSpook:Float = 0;
|
||||||
|
|
Loading…
Reference in a new issue