Example #1
0
    private void PreloadFX(ResWeight.ResType type)
    {
        if (ResWeight.IsLoadFinished(type))
        {
            this.JustLoadNextResource(ResWeight.ResType.none);
            return;
        }
        using (HashSet <int> .Enumerator enumerator = LoadingRes.m_load_fxIds.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                int current = enumerator.get_Current();
                Fx  fx      = DataReader <Fx> .Get(current);

                if (fx == null)
                {
                    this.LoadSuccessWithCheck(type);
                }
                else
                {
                    AssetManager.LoadAssetWithPool(fx.path, delegate(bool isSuccess)
                    {
                        this.LoadSuccessWithCheck(type);
                    });
                }
            }
        }
    }
Example #2
0
 public void InitResourceCounter()
 {
     LoadingRes.ResetResourceCounter();
     this.ClearIllegalData();
     ResWeight.ResetAll();
     LoadingRes.CalTotalNum();
 }
Example #3
0
 private void LoadSuccessWithCheck(ResWeight.ResType type)
 {
     Loading.Instance.PreloadFinish(ResWeight.GetWeight(type));
     ResWeight.LoadSuccess(type);
     if (ResWeight.IsLoadFinished(type))
     {
         this.JustLoadNextResource(type);
     }
 }
Example #4
0
 private void PreloadSpines(ResWeight.ResType type)
 {
     if (ResWeight.IsLoadFinished(type))
     {
         this.JustLoadNextResource(ResWeight.ResType.none);
         return;
     }
     using (HashSet <string> .Enumerator enumerator = LoadingRes.m_load_spines.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             string current = enumerator.get_Current();
             AssetManager.AssetOfSpineManager.LoadAssetWithPool(FileSystem.GetPathOfSpine(current), delegate(bool isSuccess)
             {
                 this.LoadSuccessWithCheck(type);
             });
         }
     }
 }
Example #5
0
 private void PreloadUiAtlas(ResWeight.ResType type)
 {
     if (ResWeight.IsLoadFinished(type))
     {
         this.JustLoadNextResource(ResWeight.ResType.none);
         return;
     }
     using (HashSet <string> .Enumerator enumerator = LoadingRes.m_load_uiatlas.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             string current = enumerator.get_Current();
             AssetManager.AssetOfTPManager.LoadAtlas(current, delegate(bool isSuccess)
             {
                 this.LoadSuccessWithCheck(type);
             });
         }
     }
 }