Package com.csse3200.game.screens
Class PausableScreen
java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.csse3200.game.screens.PausableScreen
- All Implemented Interfaces:
com.badlogic.gdx.Screen
- Direct Known Subclasses:
MainGameScreen
,MiniGameScreen
public class PausableScreen
extends com.badlogic.gdx.ScreenAdapter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOverlay
(Overlay.OverlayType overlayType) Adds an overlay to the screen.void
addSnakePopupOverlay
(String texturePath) void
Removes the topmost overlay from the screen.void
rest()
Puts the screen into a resting state, pausing music and resting all entities.void
wake()
Wakes the screen from a resting state.Methods inherited from class com.badlogic.gdx.ScreenAdapter
dispose, hide, pause, render, resize, resume, show
-
Field Details
-
game
Reference to the main game instance. -
resting
protected boolean restingFlag indicating whether the screen is in a resting state.
-
-
Constructor Details
-
PausableScreen
-
-
Method Details
-
addOverlay
Adds an overlay to the screen.- Parameters:
overlayType
- The type of overlay to add.
-
addSnakePopupOverlay
-
removeOverlay
public void removeOverlay()Removes the topmost overlay from the screen. -
rest
public void rest()Puts the screen into a resting state, pausing music and resting all entities. -
wake
public void wake()Wakes the screen from a resting state.
-