示例#1
0
        public void AdvanceOneSubTick(float dt)
        {
            List <BaseUpdateBucket> list = bucketFrames[nextUpdateIndex];
            int count = list.Count;

            for (int i = 0; i < count; i++)
            {
                BaseUpdateBucket baseUpdateBucket = list[i];
                if (baseUpdateBucket.count != 0)
                {
                    baseUpdateBucket.Update(dt);
                }
            }
            nextUpdateIndex = (nextUpdateIndex + 1) % bucketFrames.Count;
        }
示例#2
0
 public void AddBucket(BaseUpdateBucket bucket)
 {
     bucketFrames[nextBucketFrame].Add(bucket);
     bucket.frame    = nextBucketFrame;
     nextBucketFrame = (nextBucketFrame + 1) % bucketFrames.Count;
 }
示例#3
0
 public void AddBucket(UpdateRate update_rate, BaseUpdateBucket bucket)
 {
     bucketGroups[(int)update_rate].AddBucket(bucket);
 }