summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d94431)
raw | patch | inline | side by side (parent: 2d94431)
author | fred-boy <fred-boy@protonmail.com> | |
Sat, 7 Apr 2018 03:14:04 +0000 (10:14 +0700) | ||
committer | fred-boy <fred-boy@protonmail.com> | |
Sat, 7 Apr 2018 03:14:04 +0000 (10:14 +0700) |
core/src/ru/deadsoftware/cavecraft/game/GameInputHandler.java | patch | blob | history |
diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameInputHandler.java b/core/src/ru/deadsoftware/cavecraft/game/GameInputHandler.java
index d63568cb1dad36a1cfd5bd16d310e6fe43297657..899fbba6f06578dd4ca66ec47162e596cdc3a231 100644 (file)
}
public void keyDown(int keyCode) {
- if (keyCode == Input.Keys.LEFT) {
+ if (keyCode == Input.Keys.A) {
gameProc.player.moveX.add(-GamePhysics.PL_SPEED,0);
gameProc.player.dir = 0;
}
- if (keyCode == Input.Keys.RIGHT) {
+ if (keyCode == Input.Keys.D) {
gameProc.player.moveX.add(GamePhysics.PL_SPEED,0);
gameProc.player.dir = 1;
}
- if (keyCode == Input.Keys.UP &&
+ if (keyCode == Input.Keys.SPACE &&
gameProc.player.canJump) gameProc.player.moveY.add(0,-8);
}
public void keyUp(int keyCode) {
- if (keyCode == Input.Keys.RIGHT || keyCode == Input.Keys.LEFT) {
+ if (keyCode == Input.Keys.A || keyCode == Input.Keys.D) {
gameProc.player.moveX.x = 0;
}
}
}
public void touchDragged(int screenX, int screenY) {
- /*gameProc.renderer.camera.position.x += (gameProc.touchDownX-screenX);
- gameProc.renderer.camera.position.y += (gameProc.touchDownY-screenY);
- gameProc.touchDownX = screenX;
- gameProc.touchDownY = screenY;
- gameProc.isTouchDown = false;*/
}
public void scrolled(int amount) {