Use FlxBitmapText for scoreText

This commit is contained in:
ACrazyTown
2026-02-23 16:04:29 -07:00
committed by Hundrec
parent 1b13c6c53b
commit 823120cdef
3 changed files with 11 additions and 6 deletions
+1 -1
Submodule assets updated: 5be03b9cd8...cd36d5bfcb
+1
View File
@@ -147,6 +147,7 @@
}
],
"excludes": [
"assets/fonts/vcr-bmp.png",
"assets/preload/images/cursor/",
"assets/preload/images/fonts/",
"assets/preload/images/freeplay/",
+9 -5
View File
@@ -11,7 +11,8 @@ import flixel.FlxSubState;
import flixel.math.FlxMath;
import flixel.math.FlxPoint;
import flixel.sound.FlxSound;
import flixel.text.FlxText;
import flixel.text.FlxBitmapFont;
import flixel.text.FlxBitmapText;
import flixel.tweens.FlxTween;
import flixel.tweens.FlxEase;
import flixel.ui.FlxBar;
@@ -548,9 +549,9 @@ class PlayState extends MusicBeatSubState
* RENDER OBJECTS
*/
/**
* The FlxText which displays the current score.
* The FlxBitmapText which displays the current score.
*/
var scoreText:FlxText;
var scoreText:FlxBitmapText;
/**
* The bar which displays the player's health.
@@ -807,7 +808,7 @@ class PlayState extends MusicBeatSubState
// Healthbar
healthBarBG = FunkinSprite.create(0, 0, 'healthBar');
healthBar = new FlxBar(0, 0, RIGHT_TO_LEFT, Std.int(healthBarBG.width - 8), Std.int(healthBarBG.height - 8), null, 0, 2);
scoreText = new FlxText(0, 0, 0, '', 20);
scoreText = new FlxBitmapText(0, 0, '', FlxBitmapFont.fromAngelCode(Paths.font("vcr-bmp.png"), Paths.font("vcr-bmp.fnt")));
// Combo & Pop Up
comboPopUps = new PopUpStuff(noteStyle);
@@ -2006,7 +2007,10 @@ class PlayState extends MusicBeatSubState
// The score text below the health bar.
scoreText.x = healthBarBG.x + healthBarBG.width - 190;
scoreText.y = healthBarBG.y + 30;
scoreText.setFormat(Paths.font('vcr.ttf'), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
scoreText.alignment = RIGHT;
scoreText.borderStyle = OUTLINE;
scoreText.borderColor = FlxColor.BLACK;
scoreText.letterSpacing = -1;
scoreText.scrollFactor.set();
scoreText.zIndex = 802;
add(scoreText);