Example #1
0
 void DisconnectCallback(GameMessage message)
 {
     try
     {
         _infoStack.Push(String.Format("Disconnected from server: {0}", message.messageAsString()));
         _client.Dispose();
         _client = null;
     }
     catch (Exception e)
     {
         _errorStack.Push(e.Message);
     }
 }
Example #2
0
 public void ClientDisconnect(GameMessage message)
 {
     clientBox.AddMessage(String.Format("Disconnected: {0}", message.messageAsString()));
 }
Example #3
0
 public void ClientDisconnect(int clientNumber, GameMessage message)
 {
     try
     {
         _infoStack.Push(String.Format("Client {0} disconnected: {1}", clientNumber, message.messageAsString()));
         messages.Remove(clientNumber);
         _messageStacks.Remove(clientNumber);
         broadcastMessages.Add(DespawnMessage(playerInfo[clientNumber].EntityID));
         RemoveEntity(entities[playerInfo[clientNumber].EntityID]);
         playerInfo.Remove(clientNumber);
     }
     catch (Exception e)
     {
         _errorStack.Push(e.Message);
     }
 }