Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Input.check(Key.D)) {
- if (veloc.x < Gameconsts.PLAYER_SPEED) { if (onground) veloc.x ++ else veloc.x += .5; };
- } else if (Input.check(Key.A)) {
- if (true) { if (onground) veloc.x -- else veloc.x -= .5; };
- } else {
- if (veloc.x > .5) {
- if (onground) veloc.x -- else veloc.x -= .5;
- } else if (veloc.x < -.5) {
- if (onground) veloc.x ++ else veloc.x += .5;
- } else veloc.x = 0;
- }
Add Comment
Please, Sign In to add comment