private void uLink_OnDisconnectedFromServer(uLink.NetworkDisconnection netDisconnect) { if (this.levelLoader) { UnityEngine.Object.Destroy(this.levelLoader); } try { DisableOnConnectedState.OnDisconnected(); } finally { UnityEngine.Object.Destroy(base.gameObject); } }
private void uLink_OnFailedToConnect(NetworkConnectionError ulink_error) { this.LogDisconnect(ulink_error.ToNetError(), null); DisableOnConnectedState.OnDisconnected(); ConsoleSystem.Run("gameui.show", false); this.LoadBackground(); if (ulink_error.ToNetError() != NetError.NoError) { this.ShowInformation("Failed to connect (" + ulink_error.ToNetError().ToString() + ")"); } else { this.ShowInformation("Failed to connect."); } LoadingScreen.Hide(); }
private void uLink_OnDisconnectedFromServer(NetworkDisconnection netDisconnect) { NetError lastKickReason = ServerManagement.GetLastKickReason(true); this.LogDisconnect(lastKickReason, new NetworkDisconnection?(netDisconnect)); DisableOnConnectedState.OnDisconnected(); ConsoleSystem.Run("gameui.show", false); this.LoadBackground(); if (lastKickReason != NetError.NoError) { this.ShowInformation("Disconnected (" + lastKickReason.NiceString() + ")"); } else { this.ShowInformation("Disconnected from server."); } LoadingScreen.Hide(); }
private void uLink_OnFailedToConnect(uLink.NetworkConnectionError ulink_error) { if (this.levelLoader) { UnityEngine.Object.Destroy(this.levelLoader); } if (!MainMenu.singleton) { NetError netError = ulink_error.ToNetError(); if (netError != NetError.NoError) { UnityEngine.Debug.LogError(netError.NiceString()); } } try { DisableOnConnectedState.OnDisconnected(); } finally { UnityEngine.Object.Destroy(base.gameObject); } }