Example #1
0
        private void UpdateBullets()
        {
            int bulletsSize = Bullets.Count;

            for (int i = 0; i < bulletsSize; i++)
            {
                BulletObject curBullet = Bullets.Dequeue();

                curBullet.Update();

                // If the bullet is past the top of the screen (value needs tweaking)
                if (!(curBullet.Position.Y < -30))
                {
                    Bullets.Enqueue(curBullet);
                }
            }
        }