Advertisement
Blizzardo1

From Player Class

Sep 22nd, 2014
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. /**
  2.     Blizzeta Game - An Action RPG
  3.     Copyright (C) 2014 Blizzeta Software and Gaming
  4. */
  5.     /**
  6.      * Re-Buffers the Player
  7.      */
  8.     public void tick() {
  9.         xs = 0;
  10.         ys = 0;
  11.         if(isMovingUp && !isMovingDown) {
  12.             ys -= SPEED;
  13.         } else if(isMovingDown && !isMovingUp) {
  14.             ys += SPEED;
  15.         }
  16.        
  17.         if(isMovingRight && !isMovingLeft) {
  18.             xs += SPEED;
  19.         } else if(isMovingLeft && !isMovingRight) {
  20.             xs -= SPEED;
  21.         }
  22.         move(xs,ys);
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement