Added documentation. #story[1188]
This commit is contained in:
@@ -314,37 +314,47 @@ public class InGameLobbyController extends Controller {
|
|||||||
System.out.println("Empty race user pane pressed. Joining racers");
|
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){
|
private void countdownText(long interval){
|
||||||
|
|
||||||
if (interval <=4000){
|
//Do nothing if 5 seconds or less to go
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interval <=5000){
|
if (interval <=5000){
|
||||||
//countdownTenText.setText("5");
|
//countdownTenText.setText("5");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//6 seconds left. Display 1 second for countdown
|
||||||
if (interval <=6000){
|
if (interval <=6000){
|
||||||
countdownTenText.setText("1");
|
countdownTenText.setText("1");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//7 seconds left. Display 2 seconds for countdown
|
||||||
if (interval <=7000){
|
if (interval <=7000){
|
||||||
countdownTenText.setText("2");
|
countdownTenText.setText("2");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//8 seconds left. Display 3 seconds for countdown
|
||||||
if (interval <=8000){
|
if (interval <=8000){
|
||||||
countdownTenText.setText("3");
|
countdownTenText.setText("3");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//9 seconds left. Display 4 seconds for countdown
|
||||||
if (interval <=9000){
|
if (interval <=9000){
|
||||||
countdownTenText.setText("4");
|
countdownTenText.setText("4");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//10 seconds left. Display 5 seconds for countdown
|
||||||
if (interval <=10000){
|
if (interval <=10000){
|
||||||
countdownTenText.setText("5");
|
countdownTenText.setText("5");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user