public IEnumerator Update(BKAction onComplete = null) { this.onComplete = onComplete; var loader = LoaderMgr.Load(localVersionPath); loader.isCheckRedirectError = true; loader.onComplete += ld => { if (ld.hasError) { //TODO tip DoComplete(true); return; } localVersion = new VersionCfgMgr(); if (localVersion.Init(ld.text)) { LoadVersion(localVersion.versionAddr); } else { //TODO tip DoComplete(true); } }; while (!isComplete) { yield return(null); } }
private void LoadVersion(string path) { versionText = Util.Load(path); version = VersionCfgMgr.IT; if (versionText != null && version.Init(versionText)) { DoUpdate(); } else { //TODO tip DoComplete(true); } }