Guest User

Untitled

a guest
Sep 29th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (Input.check(Key.D)) {
  2.     if (veloc.x < Gameconsts.PLAYER_SPEED) { if (onground) veloc.x ++ else veloc.x += .5; };
  3. } else if (Input.check(Key.A)) {
  4.     if (true) { if (onground) veloc.x -- else veloc.x -= .5; };
  5. } else {
  6.     if (veloc.x > .5) {
  7.         if (onground) veloc.x -- else veloc.x -= .5;
  8.     } else if (veloc.x < -.5) {
  9.         if (onground) veloc.x ++ else veloc.x += .5;
  10.     } else veloc.x = 0;
  11. }
Add Comment
Please, Sign In to add comment