Beispiel #1
0
    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);
    }
Beispiel #3
0
 public GameObject DequeueSpawned()
 {
     return(spawned.Dequeue());
 }