Package com.skloch.game
Class CreditScreen
java.lang.Object
com.skloch.game.CreditScreen
- All Implemented Interfaces:
com.badlogic.gdx.Screen
A scene2d window consisting of a title, a scrollable widget and an exit button.
Used to display the assets used in the game
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.badlogic.gdx.graphics.OrthographicCamera
private com.badlogic.gdx.scenes.scene2d.Stage
private HustleGame
private com.badlogic.gdx.utils.viewport.Viewport
-
Constructor Summary
ConstructorsConstructorDescriptionCreditScreen
(HustleGame game, com.badlogic.gdx.Screen previousScreen) A scene2d window consisting of a title, a scrollable widget and an exit button. -
Method Summary
-
Field Details
-
game
-
creditStage
private com.badlogic.gdx.scenes.scene2d.Stage creditStage -
camera
private com.badlogic.gdx.graphics.OrthographicCamera camera -
viewport
private com.badlogic.gdx.utils.viewport.Viewport viewport
-
-
Constructor Details
-
CreditScreen
A scene2d window consisting of a title, a scrollable widget and an exit button. Credits are loaded from assets/Text/credits.txt and displayed in the scrollable widget Thus any changes to assets or licenses must be reflected in credits.txt- Parameters:
game
- An instance of the HustleGame classpreviousScreen
- The screen to return to when the exit button is pressed
-
-
Method Details
-
render
public void render(float delta) Renders the credits window- Specified by:
render
in interfacecom.badlogic.gdx.Screen
- Parameters:
delta
- The time in seconds since the last render.
-
resize
public void resize(int width, int height) Correctly resizes the onscreen elements when the window is resized- Specified by:
resize
in interfacecom.badlogic.gdx.Screen
- Parameters:
width
-height
-
-
show
public void show()- Specified by:
show
in interfacecom.badlogic.gdx.Screen
-
hide
public void hide()- Specified by:
hide
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
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.Screen
-