public class Game2D extends Object implements ApplicationListener
ApplicationListener class.
Links together a PortableApplication, which is the class instantiated
by the user and GdxGraphics. This link is made by proper calls at GdxGraphics
for important events such as rendering (in render() method) or scaling (in resize(int, int)).| Modifier and Type | Field and Description |
|---|---|
protected PortableApplication |
app |
protected SpriteBatch |
batch |
OrthographicCamera |
camera |
static GdxGraphics |
g |
protected ShapeRenderer |
shapeRenderer |
| Constructor and Description |
|---|
Game2D(PortableApplication app)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
create() |
void |
dispose()
Called to remove all the allocated resources.
|
void |
pause()
Handles application life-cycle on Android and others
|
void |
render()
Mostly delegates rendering to the
app class |
void |
resize(int width,
int height)
Called when the screen has been resized
|
void |
resume()
Handles application life-cycle on Android and others
|
public static GdxGraphics g
public OrthographicCamera camera
protected PortableApplication app
protected ShapeRenderer shapeRenderer
protected SpriteBatch batch
public Game2D(PortableApplication app)
public void create()
create in interface ApplicationListenerpublic void render()
app classrender in interface ApplicationListenerpublic void resize(int width,
int height)
resize in interface ApplicationListenerpublic void pause()
pause in interface ApplicationListenerpublic void resume()
resume in interface ApplicationListenerpublic void dispose()
dispose in interface ApplicationListenerCopyright © 2014-2016 gdx2d - https://github.com/hevs-isi/gdx2d