@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); } }
@Override public void startGame() { super.startGame(); C.SCENE.registerUpdateHandler( new IUpdateHandler() { public void onUpdate(float pSecondsElapsed) { seconds -= pSecondsElapsed; cycle(); } public void reset() {} }); }