Merged current master in. Made changes to classes so tutorial again due to merge. #story[1189]
This commit is contained in:
@@ -137,9 +137,9 @@ public class HostController extends Controller {
|
||||
}
|
||||
|
||||
public void setGameType(int gameType){
|
||||
this.gameType = gameType;
|
||||
this.currentMapIndex = gameType;
|
||||
}
|
||||
|
||||
public int getGameType(){ return this.gameType; }
|
||||
public int getGameType(){ return this.currentMapIndex; }
|
||||
|
||||
}
|
||||
|
||||
@@ -468,7 +468,7 @@ public class RaceController extends Controller {
|
||||
|
||||
|
||||
//Check if the game is a tutorial
|
||||
if (parent.getGameType()==2){
|
||||
if (parent.getGameType()==4){
|
||||
isTutorial = true;
|
||||
tutorialText.setVisible(true);
|
||||
tutorialStates = new ArrayList<>(Arrays.asList(TutorialState.values()));
|
||||
|
||||
@@ -215,29 +215,32 @@ public class StartController extends Controller {
|
||||
* Countdown timer until race starts.
|
||||
*/
|
||||
private void countdownTimer() {
|
||||
new AnimationTimer() {
|
||||
@Override
|
||||
public void handle(long arg0) {
|
||||
System.out.println(parent.getGameType());
|
||||
|
||||
//Get the current race status.
|
||||
RaceStatusEnum raceStatus = visualiserRaceEvent.getVisualiserRaceState().getRaceStatusEnum();
|
||||
new AnimationTimer() {
|
||||
@Override
|
||||
public void handle(long arg0) {
|
||||
|
||||
//If the race has reached the preparatory phase, or has started...
|
||||
if (raceStatus == RaceStatusEnum.WARNING
|
||||
|| raceStatus == RaceStatusEnum.PREPARATORY
|
||||
|| raceStatus == RaceStatusEnum.STARTED) {
|
||||
//Stop this timer.
|
||||
stop();
|
||||
//Get the current race status.
|
||||
RaceStatusEnum raceStatus = visualiserRaceEvent.getVisualiserRaceState().getRaceStatusEnum();
|
||||
|
||||
//Hide this, and display the race controller.
|
||||
startWrapper.setVisible(false);
|
||||
//start.setVisible(false);//TODO is this needed?
|
||||
//If the race has reached the preparatory phase, or has started...
|
||||
if (raceStatus == RaceStatusEnum.WARNING
|
||||
|| raceStatus == RaceStatusEnum.PREPARATORY
|
||||
|| raceStatus == RaceStatusEnum.STARTED) {
|
||||
//Stop this timer.
|
||||
stop();
|
||||
|
||||
parent.beginRace(visualiserRaceEvent, controllerClient, isHost);
|
||||
//Hide this, and display the race controller.
|
||||
startWrapper.setVisible(false);
|
||||
//start.setVisible(false);//TODO is this needed?
|
||||
|
||||
parent.beginRace(visualiserRaceEvent, controllerClient, isHost);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
}.start();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ public class TitleController extends Controller {
|
||||
public void tutorialStartPressed() throws IOException {
|
||||
titleWrapper.setVisible(false);
|
||||
System.out.println("Start the tutorial!");
|
||||
parent.setGameType(2);
|
||||
parent.setGameType(4);
|
||||
parent.beginGame();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user