|
|
|
|
@ -314,37 +314,47 @@ public class InGameLobbyController extends Controller {
|
|
|
|
|
System.out.println("Empty race user pane pressed. Joining racers");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Countdown interval checker that updates the countdown text
|
|
|
|
|
* @param interval Countdown interval to check
|
|
|
|
|
*/
|
|
|
|
|
private void countdownText(long interval){
|
|
|
|
|
|
|
|
|
|
if (interval <=4000){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Do nothing if 5 seconds or less to go
|
|
|
|
|
if (interval <=5000){
|
|
|
|
|
//countdownTenText.setText("5");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//6 seconds left. Display 1 second for countdown
|
|
|
|
|
if (interval <=6000){
|
|
|
|
|
countdownTenText.setText("1");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//7 seconds left. Display 2 seconds for countdown
|
|
|
|
|
if (interval <=7000){
|
|
|
|
|
countdownTenText.setText("2");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//8 seconds left. Display 3 seconds for countdown
|
|
|
|
|
if (interval <=8000){
|
|
|
|
|
countdownTenText.setText("3");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//9 seconds left. Display 4 seconds for countdown
|
|
|
|
|
if (interval <=9000){
|
|
|
|
|
countdownTenText.setText("4");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//10 seconds left. Display 5 seconds for countdown
|
|
|
|
|
if (interval <=10000){
|
|
|
|
|
countdownTenText.setText("5");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|