示例#1
0
 /**
  * Sets the player into startposition Removes obstacles. Let's the character blink a few times.
  */
 private void setupRevive() {
   game.gameOverDialog.hide();
   player.setY(this.getHeight() / 2 - player.width / 2);
   player.setX(this.getWidth() / 6);
   obstacles.clear();
   powerUps.clear();
   player.revive();
   for (int i = 0; i < 6; ++i) {
     drawBlinking(i % 2 == 0);
     // sleep
     try {
       Thread.sleep(UPDATE_INTERVAL * 5);
     } catch (InterruptedException e) {
       e.printStackTrace();
     }
   }
   resumeAndKeepRunning();
 }