Merge pull request #7 from SemvdH/fix-async-stuff

merge Fix async stuff into master
This commit is contained in:
SemvdH
2020-10-22 17:02:30 +02:00
committed by GitHub
4 changed files with 59 additions and 29 deletions

View File

@@ -35,6 +35,10 @@ namespace Client
client = ClientData.Instance.Client;
client.OnLobbiesListReceived = updateLobbies;
client.OnLobbyLeave = leaveLobby;
client.OnServerDisconnect = () =>
{
Environment.Exit(0);
};
OnHostButtonClick = new RelayCommand(hostGame);
@@ -58,12 +62,10 @@ namespace Client
private void becomeHostForLobby(int id)
{
Debug.WriteLine($"got host succes with data {id} ");
wantToBeHost = true;
wantToBeHostId = id;
client.OnLobbiesReceivedAndWaitingForHost = hostLobbiesReceived;
}
private void hostLobbiesReceived()