Spectate mode can be selected by clients when they join a game.

#story[1194]
This commit is contained in:
fjc40
2017-09-14 14:33:21 +12:00
parent a6eea88524
commit 43a1fbcb64
5 changed files with 80 additions and 34 deletions
@@ -8,6 +8,7 @@ import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import mock.app.Event;
import mock.exceptions.EventConstructionException;
import network.Messages.Enums.RequestToJoinEnum;
import visualiser.app.App;
import visualiser.app.MatchBrowserSingleton;
import visualiser.network.MatchBrowserInterface;
@@ -95,7 +96,7 @@ public class HostGameController extends Controller {
public void connectSocket(String address, int port) throws IOException {
Socket socket = new Socket(address, port);
InGameLobbyController iglc = (InGameLobbyController)loadScene("gameLobby.fxml");
iglc.enterGameLobby(socket, true);
iglc.enterGameLobby(socket, true, RequestToJoinEnum.PARTICIPANT);//TODO may want to let the host spectate if they wish.
}
/**