Exemple #1
0
 public void LeaveGameMessageReceived(Player player)
 {
     if (player.ID == network.Me.ID)
     {
         clientData.resetPlayers();
     }
     MainGame.Instance.GeneralMessageQueue.Enqueue(player.Name + " has left the game!");
     MainGame.Instance.hostMenu.removePlayer(player);
     Thread.Sleep(1000);
 }
Exemple #2
0
        public void ServerStopped()
        {
            clientData.resetPlayers();

            MainGame.Instance.menuController.changeActivePage(MainGame.Instance.preHostGame);
            MainGame.Instance.GeneralMessageQueue.Enqueue("The server has been closed");
            Thread.Sleep(1000);
            MainGame.Instance.joinMenu.SetJoinButtonText("Join");

            network.CloseClient();
            network.CloseServer();
        }