Package com.dragonboatrace.screens
Class RoundsScreen
- java.lang.Object
-
- com.dragonboatrace.screens.RoundsScreen
-
- All Implemented Interfaces:
com.badlogic.gdx.Screen
public class RoundsScreen extends java.lang.Object implements com.badlogic.gdx.ScreenRepresents the intermediary screen between rounds that shows the player their place in the previous race and waits for the user to continue on to the next round.
-
-
Field Summary
Fields Modifier and Type Field Description private intcurrentRoundThe current round of the game.private com.badlogic.gdx.graphics.g2d.BitmapFontfontprivate DragonBoatRacegameThe instance of the game.private com.badlogic.gdx.graphics.g2d.GlyphLayoutlayoutprivate com.badlogic.gdx.graphics.g2d.BitmapFontleaderBoardFontprivate BoatplayerBoatThe instance of the players boat to bring through each round.private java.lang.StringreasonThe leaderboard to display the places of the boats in the race.
-
Constructor Summary
Constructors Constructor Description RoundsScreen(DragonBoatRace game, Boat playerBoat, java.lang.String reason)Creates a new screen to display the leaderboard from the previous round.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()voidhide()voidpause()voidrender(float delta)Render the screen to show the leaderboard of all the boats in the round and their positions.voidresize(int width, int height)voidresume()voidshow()
-
-
-
Field Detail
-
game
private final DragonBoatRace game
The instance of the game.
-
currentRound
private final int currentRound
The current round of the game.
-
playerBoat
private final Boat playerBoat
The instance of the players boat to bring through each round.
-
reason
private final java.lang.String reason
The leaderboard to display the places of the boats in the race.
-
font
private final com.badlogic.gdx.graphics.g2d.BitmapFont font
-
layout
private final com.badlogic.gdx.graphics.g2d.GlyphLayout layout
-
leaderBoardFont
private com.badlogic.gdx.graphics.g2d.BitmapFont leaderBoardFont
-
-
Constructor Detail
-
RoundsScreen
public RoundsScreen(DragonBoatRace game, Boat playerBoat, java.lang.String reason)
Creates a new screen to display the leaderboard from the previous round.- Parameters:
game- The game instance.playerBoat- The players boat to bring through each round.reason- The string that represents the positions of the boats in the round that just finished.
-
-
Method Detail
-
show
public void show()
- Specified by:
showin interfacecom.badlogic.gdx.Screen
-
render
public void render(float delta)
Render the screen to show the leaderboard of all the boats in the round and their positions.- Specified by:
renderin interfacecom.badlogic.gdx.Screen- Parameters:
delta- The time passed since the last frame.
-
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
-
-