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; }
public void AddBucket(BaseUpdateBucket bucket) { bucketFrames[nextBucketFrame].Add(bucket); bucket.frame = nextBucketFrame; nextBucketFrame = (nextBucketFrame + 1) % bucketFrames.Count; }
public void AddBucket(UpdateRate update_rate, BaseUpdateBucket bucket) { bucketGroups[(int)update_rate].AddBucket(bucket); }