Fix keyboard handling logic
This commit is contained in:
parent
c446b51556
commit
331669ad10
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user