public abstract class ScreenBasedGame extends GameContainer
GameContainer that allows for separation of a
 game into multiple GameScreens and provides support for
 Transitions between such screens via a ScreenManagergraphics, height, MAXIMUM_DELTA, polygonSpriteBatch, shapeRenderer, spriteBatch, width| Constructor and Description | 
|---|
ScreenBasedGame()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addScreen(GameScreen screen)
Add a  
GameScreen to this game | 
void | 
enterGameScreen(int id,
               Transition transitionOut,
               Transition transitionIn)
Begins a transition to a new  
GameScreen | 
abstract int | 
getInitialScreenId()
Returns the identifier of the  
GameScreen that should be shown
 when the game starts | 
ScreenManager<GameScreen> | 
getScreenManager()
Returns the  
ScreenManager used by this game | 
void | 
interpolate(float alpha)
Interpolate the game state 
 | 
void | 
onPause()  | 
void | 
onResume()  | 
protected void | 
postinit()
Internal post-initialisation code 
 | 
protected void | 
preinit(Graphics g)
Internal pre-initialisation code 
 | 
void | 
render(Graphics g)
Render the game 
 | 
void | 
update(float delta)
Update the game 
 | 
addResizeListener, createStage, dispose, getHeight, getWidth, initialise, removeResizeListener, render, resize, startpublic abstract int getInitialScreenId()
GameScreen that should be shown
 when the game startsGameScreen identifier via GameScreen.getId()public void update(float delta)
GameContainerupdate in class GameContainerdelta - The time in seconds since the last updatepublic void interpolate(float alpha)
GameContainerinterpolate in class GameContaineralpha - The alpha value to use during interpolationpublic void render(Graphics g)
GameContainerrender in class GameContainerg - The Graphics context available for renderingpublic void onPause()
onPause in class GameContainerpublic void onResume()
onResume in class GameContainerpublic void addScreen(GameScreen screen)
GameScreen to this gamescreen - The GameScreen to be addedpublic void enterGameScreen(int id,
                            Transition transitionOut,
                            Transition transitionIn)
GameScreenid - The id of the GameScreen to transition totransitionOut - The outgoing Transition, e.g. fade outtransitionIn - The incoming Transition, e.g. fade inprotected void preinit(Graphics g)
GameContainerpreinit in class GameContainerprotected void postinit()
GameContainerpostinit in class GameContainerpublic ScreenManager<GameScreen> getScreenManager()
ScreenManager used by this game