public class PauseScreen extends AbstractScreen
| Modifier and Type | Field and Description |
|---|---|
private com.badlogic.gdx.graphics.OrthographicCamera |
camera
The camera for the pause menu to use
|
private Menu |
pauseMenu
This is the menu element for the pause menu
|
private com.badlogic.gdx.utils.viewport.Viewport |
viewport |
game| Constructor and Description |
|---|
PauseScreen(GameMain game)
This constructor sets the relevant properties of the class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
This is to be called when you want to dispose of all data
|
void |
hide()
This method is called when the user hides the window
|
void |
pause()
This is called when the focus is lost on the window
|
void |
render(float delta)
Called when the screen should render itself.
|
void |
resize(int width,
int height)
This is called when the window is resized
|
void |
resume()
This method is called when the window is brought back into focus
|
void |
show()
This is ran when the navigation screen becomes the visible screen in GameMain
|
void |
update()
This method is called once a game tick
|
private Menu pauseMenu
private com.badlogic.gdx.graphics.OrthographicCamera camera
private com.badlogic.gdx.utils.viewport.Viewport viewport
public PauseScreen(GameMain game)
game - this provides access to the gameMain class so that screens can set the states of the game.public void show()
show in interface com.badlogic.gdx.Screenshow in class AbstractScreenpublic void update()
update in class AbstractScreenpublic void render(float delta)
render in interface com.badlogic.gdx.Screenrender in class AbstractScreendelta - The time in seconds since the last render.public void resize(int width,
int height)
resize in interface com.badlogic.gdx.Screenresize in class AbstractScreenwidth - - The new widthheight - - The new heightpublic void pause()
pause in interface com.badlogic.gdx.Screenpause in class AbstractScreenpublic void resume()
resume in interface com.badlogic.gdx.Screenresume in class AbstractScreenpublic void hide()
hide in interface com.badlogic.gdx.Screenhide in class AbstractScreenpublic void dispose()
dispose in interface com.badlogic.gdx.Screendispose in class AbstractScreen