[ADD] added that when you join an empty lobby you become the host

This commit is contained in:
Sem van der Hoeven
2020-10-22 13:22:52 +02:00
parent 471247827b
commit 0b72c4dc9b
5 changed files with 22 additions and 10 deletions

View File

@@ -85,14 +85,14 @@ namespace Client
private void joinLobby()
{
// lobby die je wilt joinen verwijderen
// nieuwe binnengekregen lobby toevoegen
client.OnLobbyJoinSuccess = OnLobbyJoinSuccess;
client.SendMessage(JSONConvert.ConstructLobbyJoinMessage(SelectedLobby.ID));
}
private void OnLobbyJoinSuccess()
private void OnLobbyJoinSuccess(bool isHost)
{
ClientData.Instance.User.Host = isHost;
startGameInLobby();
}