Beispiel #1
0
        private void OnClientConnectionDropped(object sender, NetComms.ConnectionEventArgs e)
        {
            // Get the player GUID
            var playerGuid = (Guid?)e.Connection.AssociatedData ?? Guid.Empty;

            Logger.Log($"NetServerWorld.OnClientConnectionDropped - lost {playerGuid}");

            // Lock while updating game state
            lock (WorldLock)
            {
                Players.Players.RemoveAll(p => p.Guid == playerGuid);
                State.Astronauts.RemoveAll(a => a.Guid == playerGuid);
            }
        }
Beispiel #2
0
 private void OnClientNewConnection(object sender, NetComms.ConnectionEventArgs e)
 {
     Logger.Log("NetServerWorld.OnClientNewConnection - new client");
 }
Beispiel #3
0
 private void OnServerConnectionDropped(object sender, NetComms.ConnectionEventArgs e)
 {
     Logger.Log("NetClientWorld.OnServerConnectionDropped");
 }