Exemple #1
0
    /// <summary>
    /// 加载
    /// </summary>
    /// <param name="pathList">Path list.</param>
    /// <param name="loaderProgress">Loader progress.</param>
    /// <param name="loaderComplete">Loader complete.</param>
    /// <param name="moduleName">Module name.</param>
    public void Loader(List <WwwLoaderPath> pathList,
                       WwwLoaderManager.DelegateLoaderProgress loaderProgress,
                       WwwLoaderManager.DelegateLoaderComplete loaderComplete,
                       string moduleName)
    {
        if (this.orderList == null)
        {
            this.orderList = new List <WwwLoaderOrder>();
        }

        WwwLoaderOrder loaderOrder = this.GetWwwLoaderOrderByOrderName(moduleName);

        if (loaderOrder == null)
        {
            loaderOrder = new WwwLoaderOrder(moduleName, pathList, loaderProgress, loaderComplete);
            this.orderList.Add(loaderOrder);
        }
        else
        {
            wwwLoaderOrder.AttackEvent(loaderProgress, loaderComplete);
        }

        if (this.orderList != null && this.orderList.Count > 0 && !this.loaderStatus)
        {
            this.LoaderOrder();
        }
    }
Exemple #2
0
 /// <summary>
 /// 加载顺序
 /// </summary>
 private void LoaderOrder()
 {
     if (this.orderList.Count > 0)
     {
         this.loaderStatus   = true;
         this.wwwLoaderOrder = this.orderList[0];
         this.LoaderItem();
     }
     else
     {
         this.loaderStatus = false;
     }
 }