Beispiel #1
0
    public IEnumerator LoadABDependences(string bundleName, string refName, LoaderProgress progress)
    {
        if (!mLoadHelper.ContainsKey(bundleName))
        {
            IABRelationMgr loader = new IABRelationMgr();

            loader.Initialize(bundleName, progress);

            if (refName != null)

            {
                loader.AddReference(refName);
            }

            mLoadHelper.Add(bundleName, loader);

            yield return(LoadABs(bundleName));
        }
        else
        {
            if (refName != null)
            {
                IABRelationMgr loader = mLoadHelper[bundleName];

                loader.AddReference(bundleName);
            }
        }
    }
 public IABLoader(LoaderProgress tmpLoaderProgress, LoadFinish tmpLoadFinish)
 {
     bundleName            = "";
     commonBundlePath      = "";
     commResLoaderProgress = 0;
     loadProgress          = tmpLoaderProgress;
     loadFinish            = tmpLoadFinish;
     abResLoader           = null;
 }
Beispiel #3
0
    public IABLoader(LoaderProgress loadProgress, LoadFinish loadFinish)
    {
        mCommonBundlePath      = "";
        mBundleName            = "";
        mCommonResLoadProgress = 0;
        mLoadFinish            = loadFinish;

        mLoadProgress = loadProgress;
    }
Beispiel #4
0
	public IABLoader(LoaderProgress loadProgress,LoadFinish loadFinish)
	{
		mCommonBundlePath = "";
		mBundleName = "";
		mCommonResLoadProgress = 0;
		mLoadFinish = loadFinish;

		mLoadProgress = loadProgress;
	}
Beispiel #5
0
 public IABLoader(LoaderProgress loaderProgress, LoadFinish loadFinish)
 {
     mBundleName       = "";
     mBundleWWWPath    = "";
     mLoadProcess      = 0;
     LoadProgressEvent = loaderProgress;
     LoadFinishEvent   = loadFinish;
     mABResLoader      = null;
 }
    public void Initialize(string bundle, LoaderProgress progress)
    {
        IsLoadFinish = false;

        mBundleName = bundle;

        mLoadProgress = progress;

        mAssetLoader = new IABLoader(progress, BundleLoadFinish);
    }
Beispiel #7
0
    /// <summary>
    /// 提供加载功能
    /// </summary>
    /// <param name="sceneName"></param>
    /// <param name="bundelName"></param>
    /// <param name="progress"></param>
    public void LoadAsset(string sceneName, string bundelName, LoaderProgress progress)
    {
        if (!mABManagerDict.ContainsKey(sceneName))
        {
            ReadConfig(sceneName);
        }
        IABSceneManager iABSceneManager = mABManagerDict[sceneName];

        iABSceneManager.LoadAsset(bundelName, progress, LoadCallBack);
    }
    //提供加载功能
    public void LoadAsset(string sceneName, string bundleName, LoaderProgress progress)
    {
        if (!loadManager.ContainsKey(sceneName))
        {
            ReadConfiger(sceneName);
        }
        IABSenceManager tmpManager = loadManager[sceneName];

        tmpManager.LoadAsset(bundleName, progress, LoadCallBack);
    }
Beispiel #9
0
 public void LoadAsset(string bundleName, LoaderProgress progress, LoadABCallBack callback)
 {
     if (mAllAsset.ContainsKey(bundleName))
     {
         mABMgr.LoadAB(bundleName, progress, callback);
     }
     else
     {
         Debug.Log("Dont contain the bundle ==" + bundleName);
     }
 }
    public void Initial(string bundle, LoaderProgress progress)
    {
        bundleName    = bundle;
        IsLoadFinish  = false;
        loaderProcess = progress;
        assetLoader   = new IABLoader(progress, BundleLoadFinish);
        assetLoader.SetBundleName(bundle);
        string bundlePath = IPathTools.GetWWWAssetBundlePath() + "/" + bundle;

        assetLoader.LoadResources(bundlePath);
    }
Beispiel #11
0
	public void LoadAsset(string bundleName,LoaderProgress progress,LoadABCallBack callback)
	{
		if (mAllAsset.ContainsKey (bundleName)) {

			mABMgr.LoadAB (bundleName, progress, callback);
		}
		else {

			Debug.Log ("Dont contain the bundle ==" + bundleName);
		}

	}
Beispiel #12
0
 public void LoadAsset(string bundleName, LoaderProgress progress, LoadAssetBundleCallBack callBack)
 {
     if (mAllAssetDict.ContainsKey(bundleName))
     {
         string bundlePath = mAllAssetDict[bundleName];
         mABManager.LoadAssetBundle(bundlePath, progress, callBack);
     }
     else
     {
         Debug.LogWarning("没有包含Bundle名:" + bundleName);
     }
 }
Beispiel #13
0
    public void Initial(string bundlePath, LoaderProgress progress)
    {
        mIsLoadFinish   = false;
        mbundlePath     = bundlePath;
        mLoaderProgress = progress;
        mABLoader       = new IABLoader(progress, BundleLoadFinish);
        mABLoader.SetBundleName(bundlePath);
        string fullPathWWW  = IPathTools.GetWWWAssetBundlePath() + "/" + bundlePath;
        string fullPathFile = IPathTools.GetAssetBundlePath() + "/" + bundlePath;

        mABLoader.LoadResources(fullPathWWW, fullPathFile);
    }
 public void LoadAsset(string bundleName, LoaderProgress progress, LoadAssetBundleCallBack callBack)
 {
     if (allAsset.ContainsKey(bundleName))
     {
         string tmpValue = allAsset[bundleName];
         abManager.LoadAssetBundle(tmpValue, progress, callBack);
     }
     else
     {
         Debug.Log("Dont contain the bundle == " + bundleName);
     }
 }
Beispiel #15
0
 //对外接口
 public void LoadAssetBundle(string bundle, LoaderProgress progress, LoadAssetBundleCallBack callBack)
 {
     if (!loadHelper.ContainsKey(bundle))
     {
         IABRelationManager loader = new IABRelationManager();
         loader.Initial(bundle, progress);
         loadHelper.Add(bundle, loader);
         callBack(scenceName, bundle);
     }
     else
     {
         Debug.Log("IABManger have contain bundle name ==" + bundle);
     }
 }
Beispiel #16
0
 public void LoadAssetBundle(string bundlePath, LoaderProgress progress, LoadAssetBundleCallBack callBack)
 {
     if (!mABRelationDict.ContainsKey(bundlePath))
     {
         IABRelationManager iABRelation = new IABRelationManager();
         iABRelation.Initial(bundlePath, progress);
         mABRelationDict.Add(bundlePath, iABRelation);
         callBack.Invoke(mSceneName, bundlePath);
     }
     else
     {
         Debug.Log("已经包含BundlePath:" + bundlePath);
     }
 }
Beispiel #17
0
    public void LoadAB(string bundleName, LoaderProgress progress, LoadABCallBack callback)
    {
        if (!mLoadHelper.ContainsKey(bundleName))
        {
            IABRelationMgr loader = new IABRelationMgr();

            loader.Initialize(bundleName, progress);

            mLoadHelper.Add(bundleName, loader);

            callback(mSceneName, bundleName);
        }
        else
        {
            Debug.Log("IABMgr contain bundle name ==" + bundleName);
        }
    }
Beispiel #18
0
 public IEnumerator LoadAssetBundleDependences(string bundleName, string refName, LoaderProgress progress)
 {
     if (!loadHelper.ContainsKey(bundleName))
     {
         IABRelationManager loader = new IABRelationManager();
         loader.Initial(bundleName, progress);
         if (refName != null)
         {
             loader.AddRefference(refName);
         }
         loadHelper.Add(bundleName, loader);
         yield return(LoadAssetBundles(bundleName));
     }
     else
     {
         if (refName != null)
         {
             IABRelationManager loader = loadHelper[bundleName];
             loader.AddRefference(refName);
         }
     }
 }
Beispiel #19
0
    public IEnumerator LoadAssetBundleDependences(string bundlePath, string refName, LoaderProgress progress)
    {
        if (!mABRelationDict.ContainsKey(bundlePath))
        {
            IABRelationManager iABRelation = new IABRelationManager();
            iABRelation.Initial(bundlePath, progress);
            //记录被依赖对象
            if (refName != null)
            {
                iABRelation.AddReference(refName);
            }

            mABRelationDict.Add(bundlePath, iABRelation);
            yield return(LoadAssetBundles(bundlePath));
        }
        else
        {
            if (refName != null)
            {
                IABRelationManager iABRelationManager = mABRelationDict[bundlePath];
                iABRelationManager.AddReference(bundlePath);
            }
        }
    }
Beispiel #20
0
	public void LoadAB(string bundleName,LoaderProgress progress,LoadABCallBack callback)
	{
		if (!mLoadHelper.ContainsKey (bundleName)) {
			IABRelationMgr loader = new IABRelationMgr ();

			loader.Initialize (bundleName, progress);

			mLoadHelper.Add (bundleName, loader);

			callback (mSceneName, bundleName);

		} else {
			Debug.Log ("IABMgr contain bundle name ==" + bundleName);
		}
	}
	public void Initialize(string bundle,LoaderProgress progress)
	{
		IsLoadFinish = false;

		mBundleName = bundle;

		mLoadProgress = progress;

		mAssetLoader = new IABLoader (progress,BundleLoadFinish);
	}
Beispiel #22
0
	public IEnumerator LoadABDependences(string bundleName,string refName,LoaderProgress progress)
	{
		if(!mLoadHelper.ContainsKey(bundleName))
		{
			IABRelationMgr loader = new IABRelationMgr();

			loader.Initialize(bundleName,progress);

			if (refName != null)

			{
				loader.AddReference(refName);
			}

			mLoadHelper.Add(bundleName,loader);

			yield return LoadABs(bundleName);
		}
		else
		{
			if (refName != null)
			{
				IABRelationMgr loader = mLoadHelper[bundleName];

				loader.AddReference(bundleName);
			}
		}
	}