public static void RemoveNodesWithCollisions(ref TileNodeNetwork network,
                                                     PositionedObjectList <TileCollisionRectangle> rectangleCollision,
                                                     PositionedObjectList <TileCollisionCircle> circleCollision)
        {
            foreach (var tileCollisionRectangle in rectangleCollision)
            {
                tileCollisionRectangle.ForceUpdateDependenciesDeep();
            }

            foreach (var tileCollisionCircle in circleCollision)
            {
                tileCollisionCircle.ForceUpdateDependenciesDeep();
            }

            var nodeCircle = new Circle {
                Radius = 20f
            };

            for (var i = network.Nodes.Count - 1; i >= 0; i--)
            {
                var node        = network.Nodes[i];
                var nodeRemoved = false;
                nodeCircle.Position = node.Position;

                if (rectangleCollision.Any(rect => rect.CollideAgainst(nodeCircle)))
                {
                    network.Remove(node);
                    nodeRemoved = true;
                }
                if (!nodeRemoved)
                {
                    if (circleCollision.Any(circle => circle.Altitude == 0 && circle.CollideAgainst(nodeCircle)))
                    {
                        network.Remove(node);
                        nodeRemoved = true;
                    }
                }
            }
        }
 private bool HasBuildingAt(Vector3 position)
 {
     return(allBuildings.Any(item => item.Collision.IsPointInside(position.X, position.Y)));
 }