private void Update() { if (switchAfter != null) { sock = switchAfter; switchAfter = null; } if (sock != null) { sock.Update(); if (!Application.isLoadingLevel && Application.loadedLevelName != "Bootstrap" && Application.loadedLevelName != "Login" && !sock.IsConnected() && (switchAfter == null || !switchAfter.IsConnected()) && !GlobalVars.Instance.shutdownNow) { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("NETWORK_BROKEN")); BuildOption.Instance.Exit(); } } }