Exemplo n.º 1
0
 /** Move the person vertically by 'distance' pixels. */
 public void moveVertical(int distance) {
   erase();
   yPosition += distance;
   draw();
 }
Exemplo n.º 2
0
 /** Make this person invisible. If it was already invisible, do nothing. */
 public void makeInvisible() {
   erase();
   isVisible = false;
 }
Exemplo n.º 3
0
 /** Move the person horizontally by 'distance' pixels. */
 public void moveHorizontal(int distance) {
   erase();
   xPosition += distance;
   draw();
 }
Exemplo n.º 4
0
 /** Change the size to the new size (in pixels). Size must be >= 0. */
 public void changeSize(int newHeight, int newWidth) {
   erase();
   height = newHeight;
   width = newWidth;
   draw();
 }