public void Disconnect() { if (Status == ConnectStatus.Connected || Status == ConnectStatus.Connecting) { App.UnsubscribeUpdate(Update); Net.CloseSocket(Net.SocketToken); ConnectTime = 0; Status = ConnectStatus.Disconnected; } }
private void OnApplicationQuit() { Debug.Log("game exit!"); Net.CloseSocket(); }