Beispiel #1
0
        private void NextTask()
        {
            if (taskQueue.Count <= 0)
            {
                return;
            }
            EZWWWTask task = taskDict[taskQueue.Dequeue()];

            taskList.Add(task.url);
            task.StartTask();
        }
Beispiel #2
0
        public EZWWWTask NewTask(string url, byte[] postData)
        {
            EZWWWTask task = gameObject.AddComponent <EZWWWTask>();

            task.SetTask(url, postData);
            task.onStopEvent += OnComplete;
            if (taskList.Count >= maxTask)
            {
                taskQueue.Enqueue(url);
                taskDict.Add(url, task);
            }
            else
            {
                taskList.Add(url);
                taskDict.Add(url, task);
                task.StartTask();
            }
            return(task);
        }