Package tech.underoaks.coldcase.stages
Class AbstractStage
java.lang.Object
com.badlogic.gdx.InputAdapter
com.badlogic.gdx.scenes.scene2d.Stage
tech.underoaks.coldcase.stages.AbstractStage
- All Implemented Interfaces:
com.badlogic.gdx.InputProcessor,com.badlogic.gdx.Screen,com.badlogic.gdx.utils.Disposable
- Direct Known Subclasses:
GameStage,HostStage,JoinStage,MainMenuStage,SettingsStage
public abstract class AbstractStage
extends com.badlogic.gdx.scenes.scene2d.Stage
implements com.badlogic.gdx.Screen
Abstract class representing a stage in the game. A stage is a container for actors
that handles input, rendering, and updates. This class implements the
Screen interface
and provides a foundation for custom stages in the game.
Subclasses must implement the buildStage(InputMultiplexer) method to add actors
and configure input processors. The `render` method handles screen rendering and updates
the stage.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.badlogic.gdx.scenes.scene2d.Stage
com.badlogic.gdx.scenes.scene2d.Stage.TouchFocus -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidbuildStage(com.badlogic.gdx.InputMultiplexer inputMultiplexer) Builds the current Stagevoidhide()booleankeyDown(int keyCode) voidThis method is called when the stage successfully establishes a connection.voidThis method is called when the stage is disconnected.voidpause()voidrender(float delta) voidresize(int width, int height) voidresume()voidshow()Methods inherited from class com.badlogic.gdx.scenes.scene2d.Stage
act, act, actorRemoved, addAction, addActor, addCaptureListener, addListener, addTouchFocus, calculateScissors, cancelTouchFocus, cancelTouchFocus, cancelTouchFocusExcept, clear, dispose, draw, getActionsRequestRendering, getActors, getBatch, getCamera, getDebugColor, getHeight, getKeyboardFocus, getRoot, getScrollFocus, getViewport, getWidth, hit, isDebugAll, isInsideViewport, keyTyped, keyUp, mouseMoved, removeCaptureListener, removeListener, removeTouchFocus, screenToStageCoordinates, scrolled, setActionsRequestRendering, setDebugAll, setDebugInvisible, setDebugParentUnderMouse, setDebugTableUnderMouse, setDebugTableUnderMouse, setDebugUnderMouse, setKeyboardFocus, setRoot, setScrollFocus, setViewport, stageToScreenCoordinates, toScreenCoordinates, touchCancelled, touchDown, touchDragged, touchUp, unfocus, unfocusAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.badlogic.gdx.Screen
dispose
-
Constructor Details
-
AbstractStage
protected AbstractStage()Default-Constructor
-
-
Method Details
-
buildStage
public abstract void buildStage(com.badlogic.gdx.InputMultiplexer inputMultiplexer) Builds the current Stage- Parameters:
inputMultiplexer- Delegates to an ordered list of other InputProcessors- "Implementation Note:"
- Subclasses must load actors in this method
-
render
public void render(float delta) - Specified by:
renderin interfacecom.badlogic.gdx.Screen
-
show
public void show()- Specified by:
showin interfacecom.badlogic.gdx.Screen
-
resize
public void resize(int width, int height) - Specified by:
resizein interfacecom.badlogic.gdx.Screen
-
hide
public void hide()- Specified by:
hidein interfacecom.badlogic.gdx.Screen
-
pause
public void pause()- Specified by:
pausein interfacecom.badlogic.gdx.Screen
-
resume
public void resume()- Specified by:
resumein interfacecom.badlogic.gdx.Screen
-
keyDown
public boolean keyDown(int keyCode) - Specified by:
keyDownin interfacecom.badlogic.gdx.InputProcessor- Overrides:
keyDownin classcom.badlogic.gdx.scenes.scene2d.Stage
-
onConnected
public void onConnected()This method is called when the stage successfully establishes a connection. It can be overridden in subclasses to handle specific actions upon connection. -
onDisconnected
public void onDisconnected()This method is called when the stage is disconnected. It can be overridden in subclasses to handle specific actions upon disconnection.
-