Skip to content

Commit

Permalink
forgot to commit xd
Browse files Browse the repository at this point in the history
  • Loading branch information
SpunBlue committed May 17, 2022
1 parent 65632ca commit 20f1a9c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Binary file added assets/fonts/prstart.ttf
Binary file not shown.
10 changes: 5 additions & 5 deletions source/GameOverState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions source/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 20f1a9c

Please sign in to comment.