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[]buttonActionsArray of function pointers invoked by button presses.private Button[]buttonsArray of buttons.private com.badlogic.gdx.graphics.g2d.BitmapFontfontprivate DragonBoatRacegameThe instance of teh game.private com.badlogic.gdx.graphics.g2d.GlyphLayoutlayoutprivate MainGameScreenpreviousScreenThe screen which lead to this one.private java.lang.StringtitleTitle 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 voiddispose()voidhide()voidpause()voidrender(float delta)Renders the screenvoidresize(int width, int height)voidresume()private voidsave()Creating (or updating) the save.voidshow()
-
-
-
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:
showin interfacecom.badlogic.gdx.Screen
-
render
public void render(float delta)
Renders the screen- Specified by:
renderin interfacecom.badlogic.gdx.Screen- Parameters:
delta- time delta
-
resize
public void resize(int width, int height)- Specified by:
resizein interfacecom.badlogic.gdx.Screen
-
pause
public void pause()
- Specified by:
pausein interfacecom.badlogic.gdx.Screen
-
resume
public void resume()
- Specified by:
resumein interfacecom.badlogic.gdx.Screen
-
hide
public void hide()
- Specified by:
hidein interfacecom.badlogic.gdx.Screen
-
dispose
public void dispose()
- Specified by:
disposein interfacecom.badlogic.gdx.Screen
-
-