public class InputManager
extends java.lang.Object
implements com.badlogic.gdx.InputProcessor
Constructor and Description |
---|
InputManager(com.jonathan.survivor.World world,
com.badlogic.gdx.graphics.OrthographicCamera worldCamera)
Creates an InputManager with the given world.
|
Modifier and Type | Method and Description |
---|---|
boolean |
keyDown(int keycode) |
boolean |
keyTyped(char character) |
boolean |
keyUp(int keycode) |
boolean |
mouseMoved(int screenX,
int screenY) |
void |
pause()
Pauses the InputManager so that it doesn't call any of the world's methods.
|
void |
resume()
Resumes the InputManager so that it can call the world's methods based on touch events.
|
boolean |
scrolled(int amount) |
boolean |
touchDown(int screenX,
int screenY,
int pointer,
int button) |
boolean |
touchDragged(int screenX,
int screenY,
int pointer) |
boolean |
touchUp(int screenX,
int screenY,
int pointer,
int button)
Called when the user releases a press anywhere on the screen.
|
public InputManager(com.jonathan.survivor.World world, com.badlogic.gdx.graphics.OrthographicCamera worldCamera)
public boolean touchUp(int screenX, int screenY, int pointer, int button)
touchUp
in interface com.badlogic.gdx.InputProcessor
public void pause()
public void resume()
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 screenX, int screenY, int pointer, int button)
touchDown
in interface com.badlogic.gdx.InputProcessor
public boolean touchDragged(int screenX, int screenY, int pointer)
touchDragged
in interface com.badlogic.gdx.InputProcessor
public boolean mouseMoved(int screenX, int screenY)
mouseMoved
in interface com.badlogic.gdx.InputProcessor
public boolean scrolled(int amount)
scrolled
in interface com.badlogic.gdx.InputProcessor