Merge pull request #11 from SemvdH/setupBranch
merge Setup branch into master
This commit is contained in:
@@ -61,6 +61,7 @@ namespace Client
|
||||
Debug.WriteLine("attempting to host game for " + ClientData.Instance.User.Username);
|
||||
client.SendMessage(JSONConvert.ConstructLobbyHostMessage());
|
||||
client.OnLobbyCreated = becomeHostForLobby;
|
||||
|
||||
}
|
||||
|
||||
private void becomeHostForLobby(int id)
|
||||
@@ -68,6 +69,7 @@ namespace Client
|
||||
Debug.WriteLine($"got host succes with data {id} ");
|
||||
wantToBeHost = true;
|
||||
wantToBeHostId = id;
|
||||
ClientData.Instance.User.Host = true;
|
||||
client.OnLobbiesReceivedAndWaitingForHost = hostLobbiesReceived;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Client.Views
|
||||
{
|
||||
User user = new User(usernameTextbox.Text);
|
||||
Client client = new Client(user.Username);
|
||||
loginButton.IsEnabled = false;
|
||||
client.OnSuccessfullConnect = () =>
|
||||
{
|
||||
// because we need to start the main window on a UI thread, we need to let the dispatcher handle it, which will execute the code on the ui thread
|
||||
@@ -42,6 +43,7 @@ namespace Client.Views
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user