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.OrthographicCameraprivate com.badlogic.gdx.scenes.scene2d.Stageprivate HustleGameprivate 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:
renderin 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:
resizein interfacecom.badlogic.gdx.Screen- Parameters:
width-height-
-
show
public void show()- Specified by:
showin interfacecom.badlogic.gdx.Screen
-
hide
public void hide()- Specified by:
hidein 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
-
dispose
public void dispose()- Specified by:
disposein interfacecom.badlogic.gdx.Screen
-