Example #1
0
    public void Refresh()
    {
        this.interrupt = false;
        BufferList <ColliderGroup> values = this.batches.get_Values();

        for (int index = 0; index < values.get_Count(); ++index)
        {
            ColliderGroup grp = values.get_Item(index);
            if (!grp.Processing)
            {
                if (grp.Count > 0)
                {
                    grp.Start();
                    if (grp.Processing)
                    {
                        grp.UpdateData();
                        grp.CreateBatches();
                        grp.RefreshBatches();
                        grp.ApplyBatches();
                        grp.DisplayBatches();
                    }
                    grp.End();
                }
                else
                {
                    grp.Clear();
                    this.DestroyColliderGroup(ref grp);
                    this.batches.RemoveAt(index--);
                }
            }
        }
    }
Example #2
0
    public void Refresh()
    {
        this.interrupt = false;
        BufferList <ColliderGroup> values = this.batches.Values;

        for (int i = 0; i < values.Count; i++)
        {
            ColliderGroup item = values[i];
            if (!item.Processing)
            {
                if (item.Count <= 0)
                {
                    item.Clear();
                    this.DestroyColliderGroup(ref item);
                    int num = i;
                    i = num - 1;
                    this.batches.RemoveAt(num);
                }
                else
                {
                    item.Start();
                    if (item.Processing)
                    {
                        item.UpdateData();
                        item.CreateBatches();
                        item.RefreshBatches();
                        item.ApplyBatches();
                        item.DisplayBatches();
                    }
                    item.End();
                }
            }
        }
    }