@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); } }
public void cycle() { if (seconds >= 4) { gameText.setText(Float.toString(seconds).substring(0, 4)); } else { gameText.setText(""); } if (seconds <= 0) { WinnablePlayArea.winnable = true; } }
public CountdownGame() { super(); gameText = new GameText(); gameText.setScale(3.0f); playAreas[0] = new WinnablePlayArea(0, this); playAreas[1] = new WinnablePlayArea(1, this); }