Esempio n. 1
0
 protected virtual void Error()
 {
     _hasError       = true;
     this.state      = FastLoadState.State_Error;
     this.bundleInfo = null;
     FireEvent();
 }
Esempio n. 2
0
 /// <summary>
 /// 检查是否已经完成了所有的依赖项加载,如果完成了所有的依赖项加载就开始加载自己本身,否则就继续等待其他依赖项加载
 /// </summary>
 /// <param name="abi"></param>
 void OnDepComplete(FastAssetBundleInfo abi)
 {
     //依赖项都加在完了,开始加载自己
     if (CheckDepComplete())
     {
         StartLoadSelfBundle();
     }
 }
Esempio n. 3
0
 internal FastAssetBundleInfo CreateBundleInfo(FastAssetBundleLoader loader, FastAssetBundleInfo abi = null, AssetBundle assetBundle = null)
 {
     if (abi == null)
     {
         abi = new FastAssetBundleInfo();
     }
     abi.bundleName = loader.bundleName.ToLower();
     abi.bundle     = assetBundle;
     return(abi);
 }
Esempio n. 4
0
    protected virtual void Complete()
    {
        if (bundleInfo == null)
        {
            this.state = FastLoadState.State_Complete;

            this.bundleInfo            = bundleManager.CreateBundleInfo(this, null, _bundle);
            this.bundleInfo.isReady    = true;
            this.bundleInfo.onUnloaded = OnBundleUnload;

            _bundle = null;
        }
        FireEvent();
    }
Esempio n. 5
0
 private void OnBundleUnload(FastAssetBundleInfo abi)
 {
     this.bundleInfo = null;
     this.state      = FastLoadState.State_None;
 }