private void OnComplete() { if (enableVFS) { var dataPath = _savePath + Versions.Dataname; var downloads = _downloader.downloads; if (downloads.Count > 0 && File.Exists(dataPath)) { OnMessage("更新本地版本信息"); var files = new List <VFile>(downloads.Count); foreach (var download in downloads) { files.Add(new VFile { name = download.name, hash = download.hash, len = download.len, }); } var file = files[0]; if (!file.name.Equals(Versions.Dataname)) { Versions.UpdateDisk(dataPath, files); } } Versions.LoadDisk(dataPath); } OnProgress(1); OnMessage("更新完成"); var version = Versions.LoadVersion(_savePath + Versions.Filename); if (version > 0) { OnVersion(version.ToString()); } //StartCoroutine(LoadGameScene()); FrameworkBoot.Event.Fire(StartBootResSystemEventArgs.EventId, StartBootResSystemEventArgs.Create(1)); }
public void StartUpdate() { Debug.Log("StartUpdate.Development:" + development); #if UNITY_EDITOR if (development) { Assets.runtimeMode = false; //StartCoroutine(LoadGameScene()); FrameworkBoot.Event.Fire(StartBootResSystemEventArgs.EventId, StartBootResSystemEventArgs.Create(1)); return; } #endif OnStart(); if (_checking != null) { StopCoroutine(_checking); } _checking = Checking(); StartCoroutine(_checking); }
public void Fire(int id, StartBootResSystemEventArgs a) { }
/// <summary> /// 创建开始启动资源系统(资源更新完毕或无需更新)事件。 /// </summary> /// <param name="resState">(0-无需更新 1-更新完成)</param> /// <returns>创建的开始启动资源系统(资源更新完毕或无需更新)事件。</returns>ram> public static StartBootResSystemEventArgs Create(int resState) { StartBootResSystemEventArgs startBootResSystemEventArgs = null; return(startBootResSystemEventArgs); }