Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void act()
- {
- x = getX();
- y = getY();
- rotation = getRotation();
- if(next != null)
- {
- if(getRotation() == 0)
- next.move(getX(), getY()+1,0);
- else if(getRotation() == 90)
- next.move(getX()-1, getY(),90);
- else if(getRotation() == 180)
- next.move(getX(), getY()-1,180);
- else if(getRotation() == 270)
- next.move(getX()+1, getY(),270);
- }
- }
Add Comment
Please, Sign In to add comment