Ejemplo n.º 1
0
        public override BoundingBox[] GetIntersecting(Vector3 position, BoundingBox box)
        {
            List <BoundingBox> intersecting = new List <BoundingBox>();

            foreach (var b in Boxes.OrderByDescending(x => x.Max.Y))
            {
                if (new BoundingBox(position + b.Min, position + b.Max).Contains(box) == ContainmentType.Intersects)
                {
                    intersecting.Add(b);
                }
            }

            return(intersecting.ToArray());
        }
Ejemplo n.º 2
0
        public void PrintTower()
        {
            var baseOfHeighestTower = Boxes.OrderByDescending(GetMaxHeightTower).First();

            PrintTower(baseOfHeighestTower);
        }