Package com.csse3200.game.screens
Class CutsceneScreen
java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.csse3200.game.screens.CutsceneScreen
- All Implemented Interfaces:
com.badlogic.gdx.Screen
public class CutsceneScreen
extends com.badlogic.gdx.ScreenAdapter
The CutsceneScreen class represents the screen used during cutscenes in the game.
It handles loading and displaying the cutscene, rendering the UI, and managing assets and services.
-
Constructor Summary
ConstructorsConstructorDescriptionCutsceneScreen(GdxGame game, GdxGame.CutsceneType cutsceneVal) Constructor for the CutsceneScreen. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes of the cutscene screen and all associated resources.Gets the CutsceneScreenDisplay component for this screen.getGame()Gets the GdxGame instance associated with this screen.getVal()Gets the cutsceneVal value associated with this screen.voidrender(float delta) Renders the cutscene screen, updating the rendering system each frame.voidresize(int width, int height) Handles resizing the cutscene screen and adjusting the renderer.Methods inherited from class com.badlogic.gdx.ScreenAdapter
hide, pause, resume, show
-
Constructor Details
-
CutsceneScreen
Constructor for the CutsceneScreen.- Parameters:
game- The main game instance.cutsceneVal- The cutscene value to determine which cutscene to load.
-
-
Method Details
-
render
public void render(float delta) Renders the cutscene screen, updating the rendering system each frame.- Specified by:
renderin interfacecom.badlogic.gdx.Screen- Overrides:
renderin classcom.badlogic.gdx.ScreenAdapter- Parameters:
delta- Time in seconds since the last frame.
-
resize
public void resize(int width, int height) Handles resizing the cutscene screen and adjusting the renderer.- Specified by:
resizein interfacecom.badlogic.gdx.Screen- Overrides:
resizein classcom.badlogic.gdx.ScreenAdapter- Parameters:
width- New width of the screen.height- New height of the screen.
-
dispose
public void dispose()Disposes of the cutscene screen and all associated resources.- Specified by:
disposein interfacecom.badlogic.gdx.Screen- Overrides:
disposein classcom.badlogic.gdx.ScreenAdapter
-
getCutsceneScreenDisplay
Gets the CutsceneScreenDisplay component for this screen.- Returns:
- The cutscene screen display.
-
getGame
Gets the GdxGame instance associated with this screen.- Returns:
- The main game instance.
-
getVal
Gets the cutsceneVal value associated with this screen.- Returns:
- The cutsceneVal value
-