Esempio n. 1
0
        IEnumerator DownLoadWWWItem()
        {
            while (wwwQue.Count > 0)
            {
                WWWItem tmpItem = wwwQue.Dequeue();
                yield return(tmpItem.Download());
            }

            isLoadFinish = true;
        }
Esempio n. 2
0
        /// <summary>
        /// 添加到请求队列
        /// </summary>
        /// <param name="item"></param>
        public void AddTask(WWWItem item)
        {
            wwwQue.Enqueue(item);

            if (wwwQue.Count == 1 && isLoadFinish)
            {
                isLoadFinish = false;
                StartCoroutine(DownLoadWWWItem());
            }
        }