void L_onProgress(LoadingEventArg arg) { if (onProgressFn != null) { onProgressFn.call(arg); } }
static public int get_current(IntPtr l) { try { Hugula.Loader.LoadingEventArg self = (Hugula.Loader.LoadingEventArg)checkSelf(l); pushValue(l, true); pushValue(l, self.current); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { Hugula.Loader.LoadingEventArg o; o = new Hugula.Loader.LoadingEventArg(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int set_current(IntPtr l) { try { Hugula.Loader.LoadingEventArg self = (Hugula.Loader.LoadingEventArg)checkSelf(l); System.Int32 v; checkType(l, 2, out v); self.current = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
internal static IEnumerator StartClearOldFiles(System.Action <LoadingEventArg> onProgress, System.Action onComplete) { string path = CUtils.GetRealPersistentDataPath(); DirectoryInfo dinfo = new DirectoryInfo(path); if (dinfo.Exists) { var allFiles = dinfo.GetFiles("*", SearchOption.AllDirectories); var loadingEventArg = new LoadingEventArg(); loadingEventArg.total = allFiles.Length; FileInfo fino; for (int i = 0; i < allFiles.Length; i++) { fino = allFiles[i]; fino.Delete(); loadingEventArg.current++; loadingEventArg.progress = (float)loadingEventArg.current / (float)loadingEventArg.total; if (onProgress != null) { onProgress(loadingEventArg); } yield return(null); } ; if (onProgress != null) { onProgress(loadingEventArg); } } if (onComplete != null) { onComplete(); } }
private static IEnumerator StartClearOldFiles(System.Action <LoadingEventArg> onProgress, System.Action onComplete) { var allStreamAbs = fileManifest.allAbInfo; var oldAbs = updateFileManifest.allAbInfo; ABInfo abinfo; var loadingEventArg = new LoadingEventArg(); loadingEventArg.total = oldAbs.Count; for (int i = 0; i < oldAbs.Count; i++) { abinfo = oldAbs[i]; loadingEventArg.current++; if (!fileManifest.CheckABCrc(abinfo)) { FileHelper.DeletePersistentFile(abinfo.abName); #if UNITY_EDITOR Debug.LogFormat("Delete old file ({0})", abinfo.abName); #endif loadingEventArg.progress = (float)loadingEventArg.current / (float)loadingEventArg.total; if (onProgress != null) { onProgress(loadingEventArg); } yield return(null); } } if (onProgress != null) { onProgress(loadingEventArg); } if (onComplete != null) { onComplete(); } }
void Awake() { DontDestroyOnLoad(this.gameObject); loadingEvent = new LoadingEventArg(); CreateFreeLoader(); }
void L_onProgress(CResLoader loader, LoadingEventArg arg) { if (onProgressFn != null) onProgressFn.call(loader, arg); }
void L_onProgress(LoadingEventArg arg) { if (onProgressFn != null) onProgressFn.call(arg); }