Ejemplo n.º 1
0
        private bool AlreadyDownloaded()
        {
            bool dataExist = GameResourceLoadManager.GetInstance().DataExist(_resName);

            if (dataExist)
            {
                GAbstractData preDownloadData = GameResourceLoadManager.GetInstance().GetGameData(_resName);
                _data = preDownloadData._data;
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
 protected virtual void UnloadImpl()
 {
     if (GetRefCount() <= 0)
     {
         if (readyToUse)
         {
             GameResourceLoadManager.GetInstance().ReleaseGameData(_resName);
         }
         else
         {
             if (GGameDataLoader.GetInstance().removeItem(this))
             {
                 GameResourceLoadManager.GetInstance().ReleaseGameData(ResName);
             }
             else
             {
                 if (error)
                 {
                     //NO CHINESE!
                     //出错的话,删掉
                     GameResourceLoadManager.GetInstance().ReleaseGameData(ResName);
                 }
                 else
                 {
                     if (GGameDataLoader.GetInstance().isInProcesser(this))
                     {
                         //NO CHINESE!
                         //TODO:正在加载中,会不会有问题
                     }
                     else
                     {
                         GameResourceLoadManager.GetInstance().ReleaseGameData(ResName);
                     }
                 }
             }
         }
     }
 }