public abstract class BasicGame extends GameContainer implements com.badlogic.gdx.InputProcessor
GameContainer
for beginners to build upongraphics, height, MAXIMUM_DELTA, shapeRenderer, spriteBatch, width
Constructor and Description |
---|
BasicGame() |
Modifier and Type | Method and Description |
---|---|
boolean |
keyDown(int keycode) |
boolean |
keyTyped(char character) |
boolean |
keyUp(int keycode) |
boolean |
mouseMoved(int x,
int y) |
void |
onPause() |
void |
onResize(int width,
int height)
Called when the game window changes dimensions.
|
void |
onResume() |
protected void |
preinit()
Internal pre-initialisation code
|
boolean |
scrolled(int amount) |
boolean |
touchDown(int x,
int y,
int pointer,
int button) |
boolean |
touchDragged(int x,
int y,
int pointer) |
boolean |
touchUp(int x,
int y,
int pointer,
int button) |
createStage, dispose, getHeight, getWidth, hide, initialise, interpolate, pause, postinit, render, render, resize, resume, show, update
protected void preinit()
GameContainer
preinit
in class GameContainer
public void onResize(int width, int height)
GameContainer
onResize
in class GameContainer
width
- The new game window widthheight
- The new game window heightpublic void onPause()
onPause
in class GameContainer
public void onResume()
onResume
in class GameContainer
public boolean keyDown(int keycode)
keyDown
in interface com.badlogic.gdx.InputProcessor
public boolean keyUp(int keycode)
keyUp
in interface com.badlogic.gdx.InputProcessor
public boolean keyTyped(char character)
keyTyped
in interface com.badlogic.gdx.InputProcessor
public boolean touchDown(int x, int y, int pointer, int button)
touchDown
in interface com.badlogic.gdx.InputProcessor
public boolean touchUp(int x, int y, int pointer, int button)
touchUp
in interface com.badlogic.gdx.InputProcessor
public boolean touchDragged(int x, int y, int pointer)
touchDragged
in interface com.badlogic.gdx.InputProcessor
public boolean mouseMoved(int x, int y)
mouseMoved
in interface com.badlogic.gdx.InputProcessor
public boolean scrolled(int amount)
scrolled
in interface com.badlogic.gdx.InputProcessor