Example #1
0
 //
 void Update()
 {
     if (this.m_iLoadIndex < this.m_lstPath.Count)
     {
         if (this.m_cLoadPackage == null)
         {
             this.m_cLoadPackage = LoadPackage.StartWWW(this.m_lstPath[this.m_iLoadIndex],
                                                        true, this.m_lstFTime[this.m_iLoadIndex],
                                                        finish_callback, error_callback,
                                                        this.m_lstResType[this.m_iLoadIndex]);
         }
         if (this.m_cLoadPackage.Complete)
         {
             this.m_cLoadPackage = null;
             this.m_iLoadIndex++;
         }
     }
     else
     {
         if (this.m_delFinishCallback == null)
         {
             Debug.LogError("The finish callback is null.");
         }
         else
         {
             this.m_delFinishCallback(this.m_mapRes);
         }
         GameObject.DestroyImmediate(this.gameObject);
     }
 }
        /// <summary>
        /// 初始化
        /// </summary>
        public void Initialize()
        {
            this.m_bStart = true;

            this.m_cLoader = LoadPackage.StartWWW(
                this.m_strFilePath, this.m_bAutoSave, this.m_lUTime, LoaderCallBack,
                ErrorCallBack, this.m_eResType, this.m_eEncryType, this.m_funDecryptFunc);
            this.m_cLoader.transform.parent = ResourceMgr.sInstance.transform;
        }