Package com.csse3200.game.screens
Class PreCombatCutsceneScreen
java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.csse3200.game.screens.ResizableScreen
com.csse3200.game.screens.PreCombatCutsceneScreen
- All Implemented Interfaces:
com.badlogic.gdx.Screen
Manages the cutscene for Enemy and Boss NPCs displayed before transitioning to the combat screen.
Handles initialization, rendering, and disposal of cutscene elements.
-
Field Summary
FieldsFields inherited from class com.csse3200.game.screens.ResizableScreen
renderer
-
Constructor Summary
ConstructorsConstructorDescriptionPreCombatCutsceneScreen
(GdxGame game, com.badlogic.gdx.Screen screen, ServiceContainer container, Entity player, Entity enemy) Creates a new cutscene screen. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes of the resources used by the cutscene screen, including renderer and services.void
pause()
Pauses the cutscene screen.void
render
(float delta) Renders the cutscene screen.void
resume()
Resumes the cutscene screen.void
setLabelBuffer
(Entity.EnemyType enemy) Methods inherited from class com.csse3200.game.screens.ResizableScreen
resize
Methods inherited from class com.badlogic.gdx.ScreenAdapter
hide, show
-
Field Details
-
kingdomType
-
-
Constructor Details
-
PreCombatCutsceneScreen
public PreCombatCutsceneScreen(GdxGame game, com.badlogic.gdx.Screen screen, ServiceContainer container, Entity player, Entity enemy) Creates a new cutscene screen.- Parameters:
game
- the game instancescreen
- the previous screencontainer
- services from the previous screenplayer
- the player entityenemy
- the enemy entity
-
-
Method Details
-
render
public void render(float delta) Renders the cutscene screen. Updates the physics engine and entity service, and handles transitioning to the combat screen once the cutscene duration has passed.- Specified by:
render
in interfacecom.badlogic.gdx.Screen
- Overrides:
render
in classResizableScreen
- Parameters:
delta
- The time elapsed since the last frame, in seconds.
-
pause
public void pause()Pauses the cutscene screen. Disables updates and rendering when the game is paused.- Specified by:
pause
in interfacecom.badlogic.gdx.Screen
- Overrides:
pause
in classResizableScreen
-
resume
public void resume()Resumes the cutscene screen. Re-enables updates and rendering when the game is resumed.- Specified by:
resume
in interfacecom.badlogic.gdx.Screen
- Overrides:
resume
in classResizableScreen
-
dispose
public void dispose()Disposes of the resources used by the cutscene screen, including renderer and services. This method is called when the screen is no longer needed.- Specified by:
dispose
in interfacecom.badlogic.gdx.Screen
- Overrides:
dispose
in classResizableScreen
-
setLabelBuffer
-