Esempio n. 1
0
 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());
 }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
 public void Init()
 {
     Mono.StartCoroutine(Work());
 }
Esempio n. 4
0
 public void Play()
 {
     Mono.StartCoroutine(Animation);
     Mono.StartCoroutine(End(Duration));
 }
 protected Coroutine StartCorention(IEnumerator routine)
 {
     return(Mono.StartCoroutine(routine));
 }