Package com.csse3200.game.screens
Class AchievementsScreen
java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.csse3200.game.screens.AchievementsScreen
- All Implemented Interfaces:
com.badlogic.gdx.Screen
public class AchievementsScreen
extends com.badlogic.gdx.ScreenAdapter
The AchievementsScreen is a game screen containing the player's achievements.
It sets up the rendering, input and services for the UI to function and manages an AchievementsDisplay component that displays the actual achievements.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAchievementsScreen
(GdxGame gdxGame) Creates a new AchievementsScreen and registers the services required, creates the renderer, and initialises the Achievements UI. -
Method Summary
Modifier and TypeMethodDescriptionprotected Entity
constructEntity
(com.badlogic.gdx.scenes.scene2d.Stage stage) Creates the AchievementsScreen's UI including components for rendering UI elements to the screen and capturing and handling UI input.void
dispose()
void
render
(float delta) void
resize
(int width, int height) Adjusts the screen when window is resized.Methods inherited from class com.badlogic.gdx.ScreenAdapter
hide, pause, resume, show
-
Field Details
-
game
-
renderer
-
backgroundTexture
-
additionalTextures
-
-
Constructor Details
-
AchievementsScreen
Creates a new AchievementsScreen and registers the services required, creates the renderer, and initialises the Achievements UI.- Parameters:
gdxGame
- current game instance
-
-
Method Details
-
resize
public void resize(int width, int height) Adjusts the screen when window is resized.- Specified by:
resize
in interfacecom.badlogic.gdx.Screen
- Parameters:
width
- new screen widthheight
- new screen height
-
constructEntity
Creates the AchievementsScreen's UI including components for rendering UI elements to the screen and capturing and handling UI input.- Parameters:
stage
- the stage to create the UI screen on- Returns:
- the UI entity
-
render
public void render(float delta) - Specified by:
render
in interfacecom.badlogic.gdx.Screen
- Overrides:
render
in classcom.badlogic.gdx.ScreenAdapter
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.Screen
- Overrides:
dispose
in classcom.badlogic.gdx.ScreenAdapter
-