public abstract class BaseScreen extends java.lang.Object implements Screen
| Modifier and Type | Field and Description |
|---|---|
protected Content |
content
content, which is displayed by the screen
|
protected SubScreenContext |
context
All not content related information about the screen
|
protected Transition[] |
transition
De|Activate transition
|
| Constructor and Description |
|---|
BaseScreen(com.badlogic.gdx.utils.viewport.Viewport viewport,
Content content)
Constructs a basic screen.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
Content |
getContent() |
void |
onActivate(ScreenId predecessor)
Will be called when the screen gets set active.
|
void |
onAdd(com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch batch,
com.badlogic.gdx.InputMultiplexer inputMultiplexer,
java.util.Map<java.lang.String,java.lang.Object> dependencyMap)
Will be called when the screen gets added to a screen switch.
|
float |
onDeactivate(ScreenId successor)
Will be called when the screen gets set inactive.
|
void |
onPause()
Will always be called on pause when the screen has been added to the screen switch.
|
void |
onRender()
Will be called on render when the screen is active.
|
void |
onResize(int width,
int height)
Will be called on resize when the screen is active.
|
void |
onResume()
Will always be called on resume when the screen has been added to the screen switch.
|
void |
onUpdate()
Will be called on update when the screen is active.
|
void |
setInTransition(Transition in)
Sets a transition which will determine the animation when the screen gets activated.
|
void |
setOutTransition(Transition out)
Sets a transition which will determine the animation when the screen gets deactivated.
|
protected final Content content
protected final SubScreenContext context
protected Transition[] transition
public BaseScreen(com.badlogic.gdx.utils.viewport.Viewport viewport,
Content content)
viewport - viewport, which should be used to manage glViewportcontent - content of the screenpublic void setOutTransition(Transition out)
ScreensetOutTransition in interface Screenout - the transitionpublic void setInTransition(Transition in)
ScreensetInTransition in interface Screenin - the transitionpublic void onActivate(ScreenId predecessor)
ScreenonActivate in interface Screenpredecessor - predecessor of the screenpublic float onDeactivate(ScreenId successor)
ScreenonDeactivate in interface Screensuccessor - successor of the screenpublic void onAdd(com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch batch,
com.badlogic.gdx.InputMultiplexer inputMultiplexer,
java.util.Map<java.lang.String,java.lang.Object> dependencyMap)
Screenpublic void onResize(int width,
int height)
Screenpublic void onUpdate()
Screenpublic void onRender()
Screenpublic void onPause()
Screenpublic void onResume()
Screenpublic void dispose()
dispose in interface com.badlogic.gdx.utils.Disposablepublic Content getContent()
getContent in interface Screen