Browse Source

Reset game

master
MB 5 years ago
parent
commit
edefd4fc59
2 changed files with 5 additions and 2 deletions
  1. +1
    -1
      Assets/Scipts/GameMode.cs
  2. +4
    -1
      Assets/Scipts/Multiplayer/Server/LoginManager.cs

+ 1
- 1
Assets/Scipts/GameMode.cs View File

@ -33,7 +33,7 @@ public class GameMode : MonoBehaviour {
public void EndGame()
{
Multiplayer.ClientManager.Instance.SendMessage(Multiplayer.PlayerMsgID.Lobby);
}
/*

+ 4
- 1
Assets/Scipts/Multiplayer/Server/LoginManager.cs View File

@ -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));

Loading…
Cancel
Save