Exemplo n.º 1
0
        public override bool LoadAsync(string path, ResLoadMgr.OnLoadEnd onLoadEnd)
        {
            //Debug.Log(@"	start load Async	{0}", item.path);
            loadAsync   = true;
            loadedState = LoadState.Loding;
            resPath     = path;

            request = Resources.LoadAsync(path);

            if (request == null)
            {
                if (onLoadEnd != null)
                {
                    onLoadEnd(null);
                }
                loadedState = LoadState.Error;
                Debug.LogError("Not Exist Resource File :[" + path + "]");
                return(false);
            }
            if (onLoadEnd != null)
            {
                OnLoadedEnd += onLoadEnd;
            }
            IEnumeratorHelper.Start(_loadAsync());
            return(true);
        }
Exemplo n.º 2
0
 public bool WaitLoadAsync(ResLoadMgr.OnLoadEnd onLoadEnd)
 {
     if (onLoadEnd != null)
     {
         //AddRef();
         if (loadedState == LoadState.Loding)
         {
             OnLoadedEnd += onLoadEnd;
         }
         else
         {
             onLoadEnd(this);
         }
     }
     return(true);
 }
Exemplo n.º 3
0
 public abstract bool LoadAsync(string path, ResLoadMgr.OnLoadEnd onLoadEnd);
Exemplo n.º 4
0
 public override bool LoadAsync(string path, ResLoadMgr.OnLoadEnd onLoadEnd)
 {
     return(true);
 }