private void Init()
        {
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            GameManager gameManager;

            if (Object.op_Inequality((Object)instanceDirect, (Object)null))
            {
                if (instanceDirect.IsRelogin)
                {
                    instanceDirect.ResetData();
                }
                else
                {
                    Object.DestroyImmediate((Object)instanceDirect);
                    gameManager = (GameManager)null;
                }
            }
            CriticalSection.ForceReset();
            ButtonEvent.Reset();
            SRPG_TouchInputModule.UnlockInput(true);
            PunMonoSingleton <MyPhoton> .Instance.Disconnect();

            UIUtility.PopCanvasAll();
            AssetManager.UnloadAll();
            AssetDownloader.Reset();
            Network.Reset();
            gameManager = MonoSingleton <GameManager> .Instance;
            GameUtility.ForceSetDefaultSleepSetting();
            if (GameUtility.IsStripBuild)
            {
                GameUtility.Config_UseAssetBundles.Value = true;
            }
            LocalizedText.UnloadAllTables();
            SRPG_InputField.ResetInput();
        }
Esempio n. 2
0
        public static bool HasCommonError(WWWResult www)
        {
            if (!Network.IsError)
            {
                return(false);
            }
            if (Network.ErrCode != Network.EErrCode.Failed && Network.ErrCode != Network.EErrCode.TimeOut)
            {
                DebugUtility.LogError("NetworkError: " + www.text);
            }
            else
            {
                DebugUtility.LogError("NetworkError: " + (object)Network.ErrCode + " : " + Network.ErrMsg);
            }
            SRPG_InputField.ResetInput();
            Network.EErrCode errCode = Network.ErrCode;
            switch (errCode + 2)
            {
            case Network.EErrCode.Success:
                FlowNode_Network.Retry();
                break;

            case Network.EErrCode.Unknown:
                FlowNode_Network.Retry();
                break;

            case Network.EErrCode.AssetVersion:
                FlowNode_Network.Failed();
                break;

            case Network.EErrCode.NoVersionDbg:
                FlowNode_Network.Version();
                break;

            case Network.EErrCode.Unknown | Network.EErrCode.NoVersionDbg:
                FlowNode_Network.Failed();
                break;

            case Network.EErrCode.Version | Network.EErrCode.NoVersionDbg:
label_16:
                Network.IsNoVersion = true;
                FlowNode_Network.Version();
                break;

            default:
                switch (errCode)
                {
                case Network.EErrCode.NoSID:
                case Network.EErrCode.GauthNoSid:
                    FlowNode_Network.SessionID();
                    break;

                case Network.EErrCode.Maintenance:
                    FlowNode_Network.Maintenance();
                    break;

                case Network.EErrCode.IllegalParam:
                    FlowNode_Network.Retry();
                    break;

                case Network.EErrCode.NoVersion:
                    goto label_16;

                case Network.EErrCode.ReturnForceTitle:
                    FlowNode_Network.Relogin();
                    break;

                default:
                    return(false);
                }
            }
            return(true);
        }