Fix keyboard handling logic

This commit is contained in:
Victor 2014-01-14 22:54:13 +02:00
parent c446b51556
commit 331669ad10

View File

@ -23,10 +23,10 @@ public class InputHandlingProcessor implements InputProcessor {
else if (keycode == Input.Keys.RIGHT) horizontal++;
int vertical = 0;
if (keycode == Input.Keys.UP) vertical--;
else if (keycode == Input.Keys.DOWN) vertical++;
if (keycode == Input.Keys.DOWN) vertical--;
else if (keycode == Input.Keys.UP) vertical++;
if ( (horizontal != 0) && (vertical != 0) ) {
if ( (horizontal != 0) || (vertical != 0) ) {
pointer.update(horizontal, vertical);
return true;
}