Package com.screens

Class PauseScreen

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

    public class PauseScreen
    extends java.lang.Object
    implements com.badlogic.gdx.Screen
    Screen that appears when the user pauses the game. Whilst the game is paused, the timer will stop counting down. From this screen, the user can exit to the main menu or resume to game
    • Constructor Summary

      Constructors 
      Constructor Description
      PauseScreen​(Kroy game, GameScreen gameScreen)
      The constructor for the pause screen
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      Called when this screen should release all resources.
      com.badlogic.gdx.Screen getThis()
      Used to pass the pause screen into the controls screen
      void hide()
      Called when this screen is no longer the current screen for a Game.
      void pause()  
      void render​(float delta)
      Called when the screen should render itself.
      void resize​(int width, int height)  
      void resume()  
      void show()
      Called when this screen becomes the current screen for a Game.
      • Methods inherited from class java.lang.Object

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

      • PauseScreen

        public PauseScreen​(Kroy game,
                           GameScreen gameScreen)
        The constructor for the pause screen
        Parameters:
        game - the game object to change between screens
        gameScreen - game screen to go back to
    • Method Detail

      • show

        public void show()
        Called when this screen becomes the current screen for a Game.
        Specified by:
        show in interface com.badlogic.gdx.Screen
      • render

        public void render​(float delta)
        Called when the screen should render itself.
        Specified by:
        render in interface com.badlogic.gdx.Screen
        Parameters:
        delta - The time in seconds since the last render.
      • resize

        public void resize​(int width,
                           int height)
        Specified by:
        resize in interface com.badlogic.gdx.Screen
        Parameters:
        width - of window
        height - of window
        See Also:
        ApplicationListener.resize(int, int)
      • pause

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

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

        public void hide()
        Called when this screen is no longer the current screen for a Game.
        Specified by:
        hide in interface com.badlogic.gdx.Screen
      • dispose

        public void dispose()
        Called when this screen should release all resources.
        Specified by:
        dispose in interface com.badlogic.gdx.Screen
      • getThis

        public com.badlogic.gdx.Screen getThis()
        Used to pass the pause screen into the controls screen
        Returns:
        pause screen