示例#1
0
        public Queue <Bullet> GetBullets()
        {
            Queue <Bullet> bullets = new Queue <Bullet>();
            Queue <Bullet> tmp     = frontWeapon.GetBullets();

            while (tmp.Count > 0)
            {
                bullets.Enqueue(tmp.Peek());
                tmp.Dequeue();
            }
            tmp = leftWeapon.GetBullets();
            while (tmp.Count > 0)
            {
                bullets.Enqueue(tmp.Peek());
                tmp.Dequeue();
            }
            tmp = rightWeapon.GetBullets();
            while (tmp.Count > 0)
            {
                bullets.Enqueue(tmp.Peek());
                tmp.Dequeue();
            }
            return(bullets);
        }