|
libgdx API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.badlogic.gdx.Game
public abstract class Game
An ApplicationListener that delegates to a Screen. This allows an application to easily have multiple screens.
Screens are not disposed automatically. You must handle whether you want to keep screens around or dispose of them when another screen is set.
| Constructor Summary | |
|---|---|
Game()
|
|
| Method Summary | |
|---|---|
void |
dispose()
Called when the Application is destroyed. |
Screen |
getScreen()
|
void |
pause()
Called when the Application is paused. |
void |
render()
Called when the Application should render itself. |
void |
resize(int width,
int height)
Called when the Application is resized. |
void |
resume()
Called when the Application is resumed from a paused state. |
void |
setScreen(Screen screen)
Sets the current screen. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.badlogic.gdx.ApplicationListener |
|---|
create |
| Constructor Detail |
|---|
public Game()
| Method Detail |
|---|
public void dispose()
ApplicationListenerApplication is destroyed. Preceded by a call to ApplicationListener.pause().
dispose in interface ApplicationListenerpublic void pause()
ApplicationListenerApplication is paused. An Application is paused before it is destroyed, when a user pressed the Home
button on Android or an incoming call happend. On the desktop this will only be called immediately before ApplicationListener.dispose()
is called.
pause in interface ApplicationListenerpublic void resume()
ApplicationListenerApplication is resumed from a paused state. On Android this happens when the activity gets focus
again. On the desktop this method will never be called.
resume in interface ApplicationListenerpublic void render()
ApplicationListenerApplication should render itself.
render in interface ApplicationListener
public void resize(int width,
int height)
ApplicationListenerApplication is resized. This can happen at any point during a non-paused state but will never happen
before a call to ApplicationListener.create().
resize in interface ApplicationListenerwidth - the new width in pixelsheight - the new height in pixelspublic void setScreen(Screen screen)
Screen.hide() is called on any old screen, and Screen.show() is called on the new
screen.
public Screen getScreen()
Screen.
|
libgdx API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||