Class EndScreen

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

    public class EndScreen
    extends Page
    Contains widgets defining the game end screen.
    • Field Summary

      • Fields inherited from class com.mygdx.game.UI.Page

        actors
    • Constructor Summary

      Constructors 
      Constructor Description
      EndScreen​(PirateGame game)
      Creates an End Screen
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void CreateActors()
      Create game end screen widgets, initialised to game loss status.
      void resize​(int width, int height)
      Resizes the viewport
      void show()
      Get player stats such as plunder etc.
      protected void update()
      Called Once per Frame
      void win()
      Set game end screen status to report a win.
      • Methods inherited from class com.badlogic.gdx.ScreenAdapter

        dispose, pause, resume
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EndScreen

        public EndScreen​(PirateGame game)
        Creates an End Screen
        Parameters:
        game - The game object this screen is viewing
    • Method Detail

      • win

        public void win()
        Set game end screen status to report a win.
      • CreateActors

        protected void CreateActors()
        Create game end screen widgets, initialised to game loss status.
        Specified by:
        CreateActors in class Page
      • update

        protected void update()
        Called Once per Frame
        Overrides:
        update in class Page
      • show

        public void show()
        Get player stats such as plunder etc. and display game end screen.
        Specified by:
        show in interface com.badlogic.gdx.Screen
        Overrides:
        show in class Page
      • resize

        public void resize​(int width,
                           int height)
        Resizes the viewport
        Specified by:
        resize in interface com.badlogic.gdx.Screen
        Overrides:
        resize in class Page
        Parameters:
        width - The horizontal dimension of the viewport
        height - The vertical dimension of the viewport