Merge remote-tracking branch 'remotes/origin/master' into story77
# Conflicts: # racevisionGame/src/main/java/mock/app/Event.java # racevisionGame/src/main/java/visualiser/Controllers/HostController.java # racevisionGame/src/main/java/visualiser/Controllers/LobbyController.java # racevisionGame/src/main/java/visualiser/Controllers/MainController.java # racevisionGame/src/main/resources/visualiser/scenes/main.fxml # settings/keyBindings.xml
This commit is contained in:
@@ -70,8 +70,8 @@ public class HostGameController extends Controller {
|
|||||||
*/
|
*/
|
||||||
public void connectSocket(String address, int port) throws IOException {
|
public void connectSocket(String address, int port) throws IOException {
|
||||||
Socket socket = new Socket(address, port);
|
Socket socket = new Socket(address, port);
|
||||||
RaceStartController rsc = (RaceStartController)loadScene("raceStart.fxml");
|
InGameLobbyController iglc = (InGameLobbyController)loadScene("gameLobby.fxml");
|
||||||
rsc.enterLobby(socket, true);
|
iglc.enterGameLobby(socket, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ public class InGameLobbyController extends Controller {
|
|||||||
@FXML
|
@FXML
|
||||||
private ImageView imageView;
|
private ImageView imageView;
|
||||||
|
|
||||||
@FXML
|
|
||||||
AnchorPane gameLobbyWrapper;
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
GridPane playerContainer;
|
GridPane playerContainer;
|
||||||
|
|
||||||
@@ -88,7 +85,7 @@ public class InGameLobbyController extends Controller {
|
|||||||
private PopulatePlayers lobbyUpdateListener;
|
private PopulatePlayers lobbyUpdateListener;
|
||||||
|
|
||||||
|
|
||||||
public void initialize(URL location, ResourceBundle resources) {
|
public void initialize() {
|
||||||
allPlayerLabels = new ArrayList(Arrays.asList(playerLabel, playerLabel2,
|
allPlayerLabels = new ArrayList(Arrays.asList(playerLabel, playerLabel2,
|
||||||
playerLabel3,
|
playerLabel3,
|
||||||
playerLabel4,
|
playerLabel4,
|
||||||
@@ -186,10 +183,6 @@ public class InGameLobbyController extends Controller {
|
|||||||
countdownTimer();
|
countdownTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AnchorPane gameLobbyWrapper(){
|
|
||||||
return gameLobbyWrapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialises the race clock/timer labels for the start time, current time, and remaining time.
|
* Initialises the race clock/timer labels for the start time, current time, and remaining time.
|
||||||
* @param visualiserRace The race to get data from.
|
* @param visualiserRace The race to get data from.
|
||||||
@@ -258,11 +251,8 @@ public class InGameLobbyController extends Controller {
|
|||||||
this.isHost = isHost;
|
this.isHost = isHost;
|
||||||
this.controllerClient = visualiserRaceEvent.getControllerClient();
|
this.controllerClient = visualiserRaceEvent.getControllerClient();
|
||||||
|
|
||||||
|
|
||||||
this.visualiserRaceEvent.getVisualiserRaceState().getBoats().addListener(this.lobbyUpdateListener);
|
this.visualiserRaceEvent.getVisualiserRaceState().getBoats().addListener(this.lobbyUpdateListener);
|
||||||
|
|
||||||
|
|
||||||
gameLobbyWrapper.setVisible(true);
|
|
||||||
startRace();
|
startRace();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
//TODO should probably let this propagate, so that we only enter this scene if everything works
|
//TODO should probably let this propagate, so that we only enter this scene if everything works
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<?import javafx.scene.layout.RowConstraints?>
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<AnchorPane fx:id="gameLobbyWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" visible="false" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.InGameLobbyController">
|
<AnchorPane fx:id="gameLobbyWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.InGameLobbyController">
|
||||||
<children>
|
<children>
|
||||||
<GridPane style="-fx-background-color: rgba(0, 0, 0, 0.5);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<GridPane style="-fx-background-color: rgba(0, 0, 0, 0.5);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
Reference in New Issue
Block a user