[FIX] nog when you click host, you are able to click the start game button
This commit is contained in:
@@ -61,6 +61,7 @@ namespace Client
|
|||||||
Debug.WriteLine("attempting to host game for " + ClientData.Instance.User.Username);
|
Debug.WriteLine("attempting to host game for " + ClientData.Instance.User.Username);
|
||||||
client.SendMessage(JSONConvert.ConstructLobbyHostMessage());
|
client.SendMessage(JSONConvert.ConstructLobbyHostMessage());
|
||||||
client.OnLobbyCreated = becomeHostForLobby;
|
client.OnLobbyCreated = becomeHostForLobby;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void becomeHostForLobby(int id)
|
private void becomeHostForLobby(int id)
|
||||||
@@ -68,6 +69,7 @@ namespace Client
|
|||||||
Debug.WriteLine($"got host succes with data {id} ");
|
Debug.WriteLine($"got host succes with data {id} ");
|
||||||
wantToBeHost = true;
|
wantToBeHost = true;
|
||||||
wantToBeHostId = id;
|
wantToBeHostId = id;
|
||||||
|
ClientData.Instance.User.Host = true;
|
||||||
client.OnLobbiesReceivedAndWaitingForHost = hostLobbiesReceived;
|
client.OnLobbiesReceivedAndWaitingForHost = hostLobbiesReceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,10 +18,11 @@ namespace SharedClientServer
|
|||||||
public const byte MESSAGE = 0x02;
|
public const byte MESSAGE = 0x02;
|
||||||
public const byte LOBBY = 0x03;
|
public const byte LOBBY = 0x03;
|
||||||
public const byte CANVAS = 0x04;
|
public const byte CANVAS = 0x04;
|
||||||
public const byte RANDOMWORD = 0x05;
|
|
||||||
public const byte MESSAGE_RECEIVED = 0x06;
|
|
||||||
public const byte GAME = 0x05;
|
public const byte GAME = 0x05;
|
||||||
|
public const byte MESSAGE_RECEIVED = 0x06;
|
||||||
|
public const byte RANDOMWORD = 0x07;
|
||||||
|
|
||||||
|
|
||||||
public enum LobbyIdentifier
|
public enum LobbyIdentifier
|
||||||
{
|
{
|
||||||
HOST,
|
HOST,
|
||||||
|
|||||||
Reference in New Issue
Block a user