Made changes to tutorial xmls. Linked button in title menu to start up a race on mouse click. Will need to make it so it starts the tutorial on click. #story[1189]
This commit is contained in:
@@ -83,7 +83,8 @@ public class Event {
|
||||
String raceXMLFile = "mock/mockXML/raceTutorial.xml";
|
||||
//String boatsXMLFile = "mock/mockXML/boatTest.xml";
|
||||
String boatsXMLFile = "mock/mockXML/boatTutorial.xml";
|
||||
String regattaXMLFile = "mock/mockXML/regattaTest.xml";
|
||||
//String regattaXMLFile = "mock/mockXML/regattaTest.xml";
|
||||
String regattaXMLFile = "mock/mockXML/regattaTutorial.xml";
|
||||
|
||||
if (singlePlayer) {
|
||||
raceXMLFile = "mock/mockXML/raceSinglePlayer.xml";
|
||||
@@ -206,7 +207,6 @@ public class Event {
|
||||
raceXML = raceXML.replace("RACE_CREATION_TIME", dateFormat.format(creationTime));
|
||||
raceXML = raceXML.replace("RACE_START_TIME", dateFormat.format(creationTime.plusSeconds(secondsToAdd)));
|
||||
|
||||
|
||||
return raceXML;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,14 @@ public class MainController extends Controller {
|
||||
*/
|
||||
public void startCss(){titleController.setDayMode();}
|
||||
|
||||
/**
|
||||
* host controller host a game
|
||||
* @throws IOException throws exception
|
||||
*/
|
||||
public void beginGame() throws IOException {
|
||||
hostController.hostGamePressed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main Controller for the applications will house the menu and the displayed pane.
|
||||
*
|
||||
|
||||
@@ -10,11 +10,15 @@ import javafx.scene.control.RadioButton;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import mock.app.Event;
|
||||
import mock.exceptions.EventConstructionException;
|
||||
import visualiser.app.App;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Controller for the opening title window.
|
||||
@@ -109,11 +113,12 @@ public class TitleController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* start tutorial event called
|
||||
*/
|
||||
public void tutorialStartPressed(){
|
||||
|
||||
public void tutorialStartPressed() throws IOException {
|
||||
titleWrapper.setVisible(false);
|
||||
System.out.println("Start the tutorial!");
|
||||
parent.beginGame();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user