Esempio n. 1
0
 /// <summary>
 /// 为主体资源添加加载记录
 /// </summary>
 /// <param name="key"></param>
 /// <param name="loader"></param>
 /// <returns></returns>
 public bool PushLoading(string key, BaseBundleLoader loader)
 {
     if (!this.LoadingCaches.ContainsKey(key))
     {
         this.LoadingCaches.Add(key, loader);
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
        /// <summary>
        /// 获取正在加载的主体资源
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public BaseBundleLoader GetLoading(string key)
        {
            BaseBundleLoader loader = null;

            if (this.LoadingCaches.TryGetValue(key, out loader))
            {
                return(loader);
            }
            return(loader);
        }