Пример #1
0
 public void paint(final Graphics g) {
   final Image image;
   if (rabbit.isMove() && rabbit.getState() == RabbitState.STOP) {
     image = changeImage();
   } else {
     image = images.get(0);
   }
   final Position pos = rabbit.getPosition();
   g.drawImage(image, pos.getX(), pos.getY(), rabbit.getWidth(), rabbit.getHeight(), this);
 }
Пример #2
0
 @Override
 public boolean changed() {
   return rabbit.isMove() || rabbit.getState() != RabbitState.STOP || rabbit.getLastactioned();
 }