Exemple #1
0
    public override void Start()
    {
        if (AppConfig.Instance.needChooseServer == false)
        {
            //测试的时候不用选服
            EnterGame();
            return;
        }

        Debug.Log("versionServer=>" + AppConfig.Instance.versionServer);

        FileMark fileMark = new FileMark(Application.persistentDataPath, FileChecker.DeleteHotfixMark);

        if (_isCallbackTypeSwitch == LoginCallbackType.RepairResource || fileMark.ReadRecord() == "true")
        {
            if (_isCallbackTypeSwitch != LoginCallbackType.RepairResource)
            {
                BuglyAgent.ReportException("UpdateController Start", "app restart for repair", "none");
            }

            FileChecker checker = new FileChecker();
            checker.CleanForRepair(isDelete =>
            {
                if (isDelete)
                {
                    FlowText.ShowMessage(I18NManager.Get("Update_RepairFinish"));
                    ConnetToServer();
                }
            });
        }
        else
        {
            ConnetToServer();
        }
    }