diff --git a/assets/fonts/prstart.ttf b/assets/fonts/prstart.ttf new file mode 100644 index 0000000..40ca6b6 Binary files /dev/null and b/assets/fonts/prstart.ttf differ diff --git a/source/GameOverState.hx b/source/GameOverState.hx index f25ac2a..bb4c7c2 100644 --- a/source/GameOverState.hx +++ b/source/GameOverState.hx @@ -13,11 +13,11 @@ class GameOverState extends FlxState override public function create() { var gameOverText:FlxText = new FlxText(0, FlxG.height / 2 - 50, FlxG.width, "Game Over"); - gameOverText.setFormat("NES", 50, 0xffffffff, "center"); + gameOverText.setFormat(AssetPaths.prstart__ttf, 50, 0xffffffff, "center"); add(gameOverText); var scoreText:FlxText = new FlxText(0, FlxG.height / 2, FlxG.width, "Score: " + PlayState.score); - scoreText.setFormat("NES", 20, 0xffffffff, "center"); + scoreText.setFormat(AssetPaths.prstart__ttf, 20, 0xffffffff, "center"); add(scoreText); if (PlayState.score > highScore) @@ -26,16 +26,16 @@ class GameOverState extends FlxState FlxG.save.flush(); var newHighScoreText:FlxText = new FlxText(0, FlxG.height / 2 + 100, FlxG.width, "New High Score!"); - newHighScoreText.setFormat("NES", 20, 0xffffffff, "center"); + newHighScoreText.setFormat(AssetPaths.prstart__ttf, 20, 0xffffffff, "center"); add(newHighScoreText); } var highScoreText:FlxText = new FlxText(0, FlxG.height / 2 + 50, FlxG.width, "High Score: " + highScore); - highScoreText.setFormat("NES", 20, 0xffffffff, "center"); + highScoreText.setFormat(AssetPaths.prstart__ttf, 20, 0xffffffff, "center"); add(highScoreText); var enterText:FlxText = new FlxText(0, FlxG.height / 2 + 150, FlxG.width, "Press Enter or Tap to Play Again"); - enterText.setFormat("NES", 20, 0xffffffff, "center"); + enterText.setFormat(AssetPaths.prstart__ttf, 20, 0xffffffff, "center"); add(enterText); } diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 52b5cc5..52cd383 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -13,7 +13,7 @@ class MainMenuState extends FlxState // create title screen text var titleText:FlxText = new FlxText(0, FlxG.height / 2 - 50, FlxG.width, "FLAPPY HAXE"); - titleText.setFormat(null, 32, 0xFFFFFFFF, "center"); + titleText.setFormat(AssetPaths.prstart__ttf, 32, 0xFFFFFFFF, "center"); add(titleText); // create start game button @@ -22,7 +22,7 @@ class MainMenuState extends FlxState // credits var creditsText:FlxText = new FlxText(0, FlxG.height - 20, FlxG.width, "by: SpunBlue"); - creditsText.setFormat(null, 8, 0xFFFFFFFF, "center"); + creditsText.setFormat(AssetPaths.prstart__ttf, 8, 0xFFFFFFFF, "center"); add(creditsText); // settings button diff --git a/source/PlayState.hx b/source/PlayState.hx index 91ccd07..1df7d9d 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -52,7 +52,7 @@ class PlayState extends FlxState add(ground); scoreUI = new FlxText(0, 0, FlxG.width, "0"); - scoreUI.setFormat("Arial", 64, 0xFFFFFFFF, "center"); + scoreUI.setFormat(AssetPaths.prstart__ttf, 64, 0xFFFFFFFF, "center"); scoreUI.y = FlxG.height - scoreUI.height; uiTextGroup.add(scoreUI); add(scoreUI);