Class GameOverScreen

  • All Implemented Interfaces:
    com.badlogic.gdx.Screen

    public class GameOverScreen
    extends java.lang.Object
    implements com.badlogic.gdx.Screen
    Displays the screen that shows the end of the game. This can be one of 3 situations:
    • If the player got to the final and finished the race.
    • The player didn't make it to the final after the 3rd round.
    • The players boat ran out of health.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.badlogic.gdx.graphics.g2d.BitmapFont font  
      private DragonBoatRace game
      The game instance.
      private com.badlogic.gdx.graphics.g2d.GlyphLayout layout  
      private com.badlogic.gdx.graphics.g2d.BitmapFont leaderBoardFont  
      protected java.lang.String reason
      The reason for the game to be over.
    • Constructor Summary

      Constructors 
      Constructor Description
      GameOverScreen​(DragonBoatRace game, java.lang.String reason)
      Creates a new screen that represents the end of the game to the player.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()  
      void hide()  
      void pause()  
      void render​(float delta)
      Renders the window to show the end of the game.
      void resize​(int width, int height)  
      void resume()  
      void show()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • reason

        protected java.lang.String reason
        The reason for the game to be over.
      • font

        private final com.badlogic.gdx.graphics.g2d.BitmapFont font
      • leaderBoardFont

        private com.badlogic.gdx.graphics.g2d.BitmapFont leaderBoardFont
      • layout

        private final com.badlogic.gdx.graphics.g2d.GlyphLayout layout
    • Constructor Detail

      • GameOverScreen

        public GameOverScreen​(DragonBoatRace game,
                              java.lang.String reason)
        Creates a new screen that represents the end of the game to the player.
        Parameters:
        game - The instance of the game.
        reason - The reason for the game to be over.
    • Method Detail

      • show

        public void show()
        Specified by:
        show in interface com.badlogic.gdx.Screen
      • render

        public void render​(float delta)
        Renders the window to show the end of the game.
        Specified by:
        render in interface com.badlogic.gdx.Screen
        Parameters:
        delta - The time passed since the last frame.
      • resize

        public void resize​(int width,
                           int height)
        Specified by:
        resize in interface com.badlogic.gdx.Screen
      • pause

        public void pause()
        Specified by:
        pause in interface com.badlogic.gdx.Screen
      • resume

        public void resume()
        Specified by:
        resume in interface com.badlogic.gdx.Screen
      • hide

        public void hide()
        Specified by:
        hide in interface com.badlogic.gdx.Screen
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.badlogic.gdx.Screen