Beispiel #1
0
        public void Update()
        {
            int taskCount = this.mTask.Count;

            if (taskCount > 0)
            {
                bool     startLoad = false;
                LoadTask l_task    = null;

                for (int i = taskCount - 1; i >= 0; i--)
                {
                    l_task = this.mTask[i];
                    if (l_task.CheckLLoad())
                    {
                        startLoad          = true;
                        this.mCurLoadCount = this.mCurLoadCount - l_task.mLoadCount;

                        this.mBundleLoadTaskList.Remove(l_task.mMainBundle);

                        //以下两行代码顺序不能改
                        this.mTask.Remove(l_task);
                        l_task.LoadComplete();
                    }
                    else
                    {
                        if (startLoad)
                        {
                            this.StartLoadTask();
                        }
                        return;
                    }
                }
                if (startLoad)
                {
                    this.StartLoadTask();
                }
            }
        }