player flips, stays flipped when moving left - bug fixed

master
GammelJan 6 years ago
parent ce2a39cdd0
commit 26a486a8f4

@ -67,17 +67,25 @@ public class Controller extends ApplicationAdapter implements InputProcessor{
@Override @Override
public boolean keyUp(int keycode) { public boolean keyUp(int keycode) {
if(keycode == Input.Keys.LEFT || keycode == Input.Keys.RIGHT){ if(keycode == Input.Keys.LEFT){
movementX = 0f; movementX = 0f;
v.trechtsstop();
v.tlinksstop(); v.tlinksstop();
} }
if(keycode == Input.Keys.DOWN || keycode == Input.Keys.UP){ if(keycode == Input.Keys.RIGHT){
movementX = 0f;
v.trechtsstop();
}
if(keycode == Input.Keys.DOWN){
movementY = 0f; movementY = 0f;
v.tobenstop();
v.tuntenstop(); v.tuntenstop();
} }
if(keycode == Input.Keys.UP){
movementY = 0f;
v.tobenstop();
}
return true; return true;
} }

Loading…
Cancel
Save