Пример #1
0
 @Override
 public void endAndDisplayResult(GameResult result) {
   super.endAndDisplayResult(result);
   if (seconds <= 0) {
     gameText.setText(Float.toString(seconds).substring(0, 5));
     gameText.setColor(Color.GREEN);
   } else {
     gameText.setText("+" + Float.toString(seconds).substring(0, 4));
     gameText.setColor(Color.RED);
   }
 }
Пример #2
0
  public void cycle() {
    if (seconds >= 4) {
      gameText.setText(Float.toString(seconds).substring(0, 4));
    } else {
      gameText.setText("");
    }

    if (seconds <= 0) {
      WinnablePlayArea.winnable = true;
    }
  }
Пример #3
0
 public CountdownGame() {
   super();
   gameText = new GameText();
   gameText.setScale(3.0f);
   playAreas[0] = new WinnablePlayArea(0, this);
   playAreas[1] = new WinnablePlayArea(1, this);
 }