Ejemplo n.º 1
0
        public void UpdateDone()
        {
            if (idCount > 0)
            {
                for (int i = 0; i < idCount; ++i)
                {
                    workers[i].UpdateDone();
                }
            }

            if (tmpCount > 0)
            {
                for (int i = 0; i < tmpCount;)
                {
                    UnityCbTaskExecutor tmp = tmpExecutors[i];
                    if (tmp.UpdateDone())
                    {
                        tmpExecutors.RemoveAt(i);
                        tmpCount--;
                    }
                    else
                    {
                        ++i;
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private UnityCbTaskExecutor GetTempWorker()
        {
            UnityCbTaskExecutor we = new UnityCbTaskExecutor("tmp", true, true);

            tmpExecutors.Add(we);
            ++tmpCount;
            return(we);
        }
Ejemplo n.º 3
0
        private UnityCbTaskExecutor GetWorker(int id, bool autoShutDown = false)
        {
            for (int i = 0; i < idCount; ++i)
            {
                if (workers[i].Id == id)
                {
                    return(workers[i]);
                }
            }

            UnityCbTaskExecutor we = new UnityCbTaskExecutor(id.ToString(), true, autoShutDown)
            {
                Id = id
            };

            workers.Add(we);
            ++idCount;
            return(we);
        }