Example #1
0
 public override void Update(float delta)
 {
     while (currQueue.Count > 0)
     {
         var animation = currQueue.Dequeue().Value;
         nextQueue.Enqueue(animation.Owner.Depth, animation.QueueNode);
         animation.Advance(delta * animation.OwnerNode.EffectiveAnimationSpeed);
     }
     Toolbox.Swap(ref currQueue, ref nextQueue);
 }
Example #2
0
        public static void Resize(ref BucketQueue <T> queue, int newBucketCount)
        {
            var newQueue = new BucketQueue <T>(newBucketCount);

            while (queue.Count > 0)
            {
                var bucketIndex = queue.Peek().BucketIndex;
                newQueue.Enqueue(bucketIndex, queue.Dequeue());
            }
            queue = newQueue;
        }