Package com.dragonboatrace.screens
Class PauseScreen
- java.lang.Object
-
- com.dragonboatrace.screens.PauseScreen
-
- All Implemented Interfaces:
com.badlogic.gdx.Screen
public class PauseScreen extends java.lang.Object implements com.badlogic.gdx.Screen
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Runnable[]
buttonActions
Array of function pointers invoked by button presses.private Button[]
buttons
Array of buttons.private com.badlogic.gdx.graphics.g2d.BitmapFont
font
private DragonBoatRace
game
The instance of teh game.private com.badlogic.gdx.graphics.g2d.GlyphLayout
layout
private MainGameScreen
previousScreen
The screen which lead to this one.private java.lang.String
title
Title of this screen.
-
Constructor Summary
Constructors Constructor Description PauseScreen(MainGameScreen previousScreen, DragonBoatRace game)
Instance of the pause screen
-
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 screenvoid
resize(int width, int height)
void
resume()
private void
save()
Creating (or updating) the save.void
show()
-
-
-
Field Detail
-
buttonActions
private final java.lang.Runnable[] buttonActions
Array of function pointers invoked by button presses.
-
buttons
private final Button[] buttons
Array of buttons.
-
game
private final DragonBoatRace game
The instance of teh game.
-
previousScreen
private final MainGameScreen previousScreen
The screen which lead to this one.
-
font
private final com.badlogic.gdx.graphics.g2d.BitmapFont font
-
layout
private final com.badlogic.gdx.graphics.g2d.GlyphLayout layout
-
title
private final java.lang.String title
Title of this screen.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PauseScreen
public PauseScreen(MainGameScreen previousScreen, DragonBoatRace game)
Instance of the pause screen- Parameters:
previousScreen
- The screen where this screen was createdgame
- instance of the game
-
-
Method Detail
-
save
private void save()
Creating (or updating) the save. Notifies the user when this is done.
-
show
public void show()
- Specified by:
show
in interfacecom.badlogic.gdx.Screen
-
render
public void render(float delta)
Renders the screen- Specified by:
render
in interfacecom.badlogic.gdx.Screen
- Parameters:
delta
- time delta
-
resize
public void resize(int width, int height)
- Specified by:
resize
in interfacecom.badlogic.gdx.Screen
-
pause
public void pause()
- Specified by:
pause
in interfacecom.badlogic.gdx.Screen
-
resume
public void resume()
- Specified by:
resume
in interfacecom.badlogic.gdx.Screen
-
hide
public void hide()
- Specified by:
hide
in interfacecom.badlogic.gdx.Screen
-
dispose
public void dispose()
- Specified by:
dispose
in interfacecom.badlogic.gdx.Screen
-
-