Example #1
0
 public static void Preload()
 {
     LoginLoadingRes.Instance.total_res_count += ResourceRegulation.whitelist2spine.get_Count();
     LoginLoadingRes.Instance.total_res_count += ResourceRegulation.whitelist2uiatlas.get_Count();
     LoginLoadingRes.Instance.total_res_count += ResourceRegulation.temp_uilist.get_Count();
     for (int i = 0; i < ResourceRegulation.whitelist2spine.get_Count(); i++)
     {
         FXSpineManager.Instance.PreloadAsset(ResourceRegulation.whitelist2spine.get_Item(i), delegate
         {
             LoginLoadingRes.Instance.PreloadResourceFinish();
         });
     }
     for (int j = 0; j < ResourceRegulation.whitelist2uiatlas.get_Count(); j++)
     {
         string atlas_no_suffix = ConstTP.suffix_atlas_To_src(ResourceRegulation.whitelist2uiatlas.get_Item(j));
         AssetManager.AssetOfTPManager.LoadAtlas(atlas_no_suffix, delegate(bool isSuccess)
         {
             LoginLoadingRes.Instance.PreloadResourceFinish();
         });
     }
     for (int k = 0; k < ResourceRegulation.temp_uilist.get_Count(); k++)
     {
         AssetManager.LoadAssetWithPool(ResourceRegulation.temp_uilist.get_Item(k), delegate(bool isSuccess)
         {
             LoginLoadingRes.Instance.PreloadResourceFinish();
         });
     }
     ResourceRegulation.Uninit();
 }
Example #2
0
 private static void ReleaseAtlas(string src)
 {
     src = src.ToLower();
     AssetManager.AssetOfTPManager.m_reference_atlas.Remove(ConstTP.src_To_suffix_atlas(src));
     if (AssetManager.AssetOfTPManager.m_atlas_uisprites.ContainsKey(src))
     {
         AssetManager.AssetOfTPManager.m_atlas_uisprites.set_Item(src, null);
         AssetManager.AssetOfTPManager.m_atlas_uisprites.Remove(src);
     }
     AssetManager.MinusAssetRef(FileSystem.GetPath(src + "_pb", string.Empty));
 }
Example #3
0
 private static void AddToUiSprites(string src, Dictionary <string, SpriteRenderer> sprites)
 {
     if (sprites == null)
     {
         return;
     }
     src = src.ToLower();
     if (!AssetManager.AssetOfTPManager.m_atlas_uisprites.ContainsKey(src))
     {
         AssetManager.AssetOfTPManager.m_atlas_uisprites.set_Item(src, sprites);
         AssetManager.AssetOfTPManager.InitReference(ConstTP.src_To_suffix_atlas(src));
         AssetManager.AddAssetRef(ConstTP.src_To_suffix_prefab(src));
     }
 }