GameOverScreen

Finally, we need a mechanism to enable the game to end and allow the player to reload from a previous save, since the element of the player character death naturally comes with adding a battle system. The following screenshot (Figure 11) represents the game over screen for BludBourne when the HP for the player's character reaches 0:

GameOverScreen

Figure 11

This screen will load the LoadGameScreen when the Continue button is pressed, allowing the user to reload from a previous save game. The screen will also load the MainMenuScreen when the Main Menu button is pressed. The workflow for enabling this screen starts with PlayerHUD receiving a notification ...

Get Mastering LibGDX Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.