|
|
@ -24,6 +24,7 @@ namespace Multiplayer |
|
|
|
ServerManager.Server.RegisterHandler(MsgType.Connect, OnConnect); |
|
|
|
ServerManager.Server.RegisterHandler(MsgType.Disconnect, OnDisconnect); |
|
|
|
ServerManager.Server.RegisterHandler(PlayerMsgID.GameStart, ClientStartsGame); |
|
|
|
ServerManager.Server.RegisterHandler(PlayerMsgID.Lobby, GoToLobby); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -78,7 +79,9 @@ namespace Multiplayer |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void GoToLobby() |
|
|
|
|
|
|
|
|
|
|
|
private void GoToLobby(NetworkMessage msg) |
|
|
|
{ |
|
|
|
foreach(Player player in ServerManager.AllPlayers.Values) |
|
|
|
player.Connection.Send(PlayerMsgID.Lobby, new PlayerMsg(player.ID)); |
|
|
|