Guest User

Untitled

a guest
Jun 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public void act()
  2. {
  3. x = getX();
  4. y = getY();
  5. rotation = getRotation();
  6. if(next != null)
  7. {
  8. if(getRotation() == 0)
  9. next.move(getX(), getY()+1,0);
  10. else if(getRotation() == 90)
  11. next.move(getX()-1, getY(),90);
  12. else if(getRotation() == 180)
  13. next.move(getX(), getY()-1,180);
  14. else if(getRotation() == 270)
  15. next.move(getX()+1, getY(),270);
  16. }
  17. }
Add Comment
Please, Sign In to add comment