public void RemoveChildJob(Job childJob) { if (childrenJobQueue.Contains(childJob) == false) { #if DEBUG_LOG Debug.LogWarning("WARNING: Job.RemoveChildJob: this job doesn't contain that child"); #endif return ; } Queue<Job> newChildrenJobQueue = new Queue<Job>(childrenJobQueue.Count - 1); Job[] allCurrentChildren = childrenJobQueue.ToArray(); for (int i = 0; i < allCurrentChildren.Length; ++i) { Job j = allCurrentChildren[i]; if (j != childJob) { newChildrenJobQueue.Enqueue(j); } } childrenJobQueue = newChildrenJobQueue; }
public void StartDownload() { #if DEBUG_LOG Debug.Log("DEBUG: TileEntry.StartDownload: " + url); #endif job = new Job(DownloadCoroutine(), this); job.JobComplete += jobCompleteHandler; }
public void AddChildJob(Job child) { if (childrenJobQueue == null) childrenJobQueue = new Queue<Job>(); childrenJobQueue.Enqueue(child); }
public Job CreateAndAddChildJob(IEnumerator coroutine) { Job j = new Job(coroutine, false); AddChildJob(j); return j; }