void StartLoader(params ILoader[] loaders) { if (loaders == null || loaders.Length == 0) { CLog.Error("错误,没有Loader"); return; } foreach (var item in loaders) { loderList.Add(item); } IsLoadEnd = false; Mono.StartCoroutine(IEnumerator_Load()); }
IEnumerator IEnumerator_Load() { Callback_OnStartLoad?.Invoke(); for (int i = 0; i < loderList.Count; ++i) { LoadInfo = loderList[i].GetLoadInfo(); yield return(Mono.StartCoroutine(loderList[i].Load())); Percent = i / loderList.Count; } Callback_OnLoadEnd?.Invoke(LoadEndType.Success, LoadInfo); IsLoadEnd = true; Callback_OnAllLoadEnd?.Invoke(); Callback_OnAllLoadEnd2?.Invoke(); }
public void Init() { Mono.StartCoroutine(Work()); }
public void Play() { Mono.StartCoroutine(Animation); Mono.StartCoroutine(End(Duration)); }
protected Coroutine StartCorention(IEnumerator routine) { return(Mono.StartCoroutine(routine)); }