public GameObject ActivateSegment() { GameObject go = (pool.Count > 0) ? pool.Dequeue() : MakeSegment(); spawned.Enqueue(go); segmentBehavior.ActivateSegment(go, this); var t = go.transform.localPosition; t.y = -100; go.transform.localPosition = t; return(go); }
private void ThreadDequeue(SpecialQueue <ThreadInfo> dataQueue) { ThreadInfo threadInfo = dataQueue.Dequeue(); if (threadInfo.parameter == null || threadInfo.callback == null) { return; } threadInfo.callback(threadInfo.parameter); }
public GameObject DequeueSpawned() { return(spawned.Dequeue()); }