public static void Dispose() { InputManager.UnLoadDispatcher <InputNetworkConnectStatusEvent>(); InputManager.UnLoadDispatcher <InputNetworkMessageEvent>(); s_network.Dispose(); s_network = null; s_heatBeat.Dispose(); s_heatBeat = null; ApplicationManager.s_OnApplicationUpdate -= Update; }
public void Dispose() { NetworkInterface.Dispose(); var handlers = ServerConnection?.MessageHandlers; if (handlers == null) { return; } handlers.UnregisterHandler(MessageCodes.UpdateInput); handlers.UnregisterHandler(MessageCodes.UpdateState); handlers.UnregisterHandler(MessageCodes.MatchStart); handlers.UnregisterHandler(MessageCodes.MatchFinish); handlers.UnregisterHandler(MessageCodes.UpdateConfig); }
public void Dispose() { if (NetworkInterface == null) { return; } NetworkInterface.Dispose(); NetworkInterface.OnPeerConnected -= OnConnect; NetworkInterface.OnPeerConnected -= OnConnect; var handlers = NetworkInterface.MessageHandlers; if (handlers == null) { return; } handlers.RegisterHandler(MessageCodes.ClientReady, OnClientReady); handlers.RegisterHandler(MessageCodes.UpdateInput, OnReceivedClientInput); }
public void Dispose() { foreach (var item in plugins.Values) { try { item.OnDispose(); } catch (Exception e) { Debug.LogError(item.GetType() + ".OnDispose \n" + e); } } if (s_network != null) { s_network.Dispose(); s_network = null; } }