public abstract class AbstractScreen
extends java.lang.Object
implements com.badlogic.gdx.Screen
| Modifier and Type | Field and Description |
|---|---|
protected GameMain |
game
The game that the Screen is live in
|
| Constructor and Description |
|---|
AbstractScreen(GameMain game)
This constructor sets the relevant properties of the class.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
dispose()
This is to be called when you want to dispose of all data
|
abstract void |
hide()
This method is called when the user hides the window
|
abstract void |
pause()
This is called when the focus is lost on the window
|
abstract void |
render(float delta)
This method is called every render loop
|
abstract void |
resize(int width,
int height)
This method is called on window resize
|
abstract void |
resume()
This method is called when the window is brought back into focus
|
abstract void |
show()
This method overrides the Screen method show()
|
abstract void |
update()
Called every game tick, all screen related logic should be done in this method.
|
protected GameMain game
public AbstractScreen(GameMain game)
game - this provides access to the gameMain class so that screens can set the states of the game.public abstract void show()
show in interface com.badlogic.gdx.Screenpublic abstract void update()
public abstract void render(float delta)
render in interface com.badlogic.gdx.Screendelta - - The time in seconds since the last drawpublic abstract void resize(int width,
int height)
resize in interface com.badlogic.gdx.Screenwidth - - The new widthheight - - The new heightpublic abstract void pause()
pause in interface com.badlogic.gdx.Screenpublic abstract void resume()
resume in interface com.badlogic.gdx.Screenpublic abstract void hide()
hide in interface com.badlogic.gdx.Screenpublic abstract void dispose()
dispose in interface com.badlogic.gdx.Screen