Package com.csse3200.game.screens
Class EndMiniGameScreen
java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.csse3200.game.screens.EndMiniGameScreen
- All Implemented Interfaces:
com.badlogic.gdx.Screen
public class EndMiniGameScreen
extends com.badlogic.gdx.ScreenAdapter
Makes a new screen when the snake game is over.
Displays the stats and add buttons to exit and restart.
Gives loot box and achievements to player based on the medal
-
Constructor Summary
ConstructorsConstructorDescriptionEndMiniGameScreen
(GdxGame game, int score, MiniGameNames gameName, com.badlogic.gdx.Screen screen, ServiceContainer container) -
Method Summary
Methods inherited from class com.badlogic.gdx.ScreenAdapter
hide, pause, resume, show
-
Constructor Details
-
EndMiniGameScreen
public EndMiniGameScreen(GdxGame game, int score, MiniGameNames gameName, com.badlogic.gdx.Screen screen, ServiceContainer container)
-
-
Method Details
-
render
public void render(float delta) Renders the stage that includes the background image and the contentsTable- Specified by:
render
in interfacecom.badlogic.gdx.Screen
- Overrides:
render
in classcom.badlogic.gdx.ScreenAdapter
- Parameters:
delta
- The time in seconds since the last render.
-
dispose
public void dispose()Dispose the fonts, skin and stage.- Specified by:
dispose
in interfacecom.badlogic.gdx.Screen
- Overrides:
dispose
in classcom.badlogic.gdx.ScreenAdapter
-
resize
public void resize(int width, int height) Resize function that automatically gets called when the screen is resized. Resizes all components with a consistent scale to maintain the screen's original design.- Specified by:
resize
in interfacecom.badlogic.gdx.Screen
- Overrides:
resize
in classcom.badlogic.gdx.ScreenAdapter
- Parameters:
width
- The width of the resized screen.height
- The height of the resized screen.
-