Buildings.CheckValidPlacement C# (CSharp) Method

CheckValidPlacement() private method

check if new building placement is ok
private CheckValidPlacement ( Building, building ) : bool
building Building,
return bool
    private bool CheckValidPlacement(Building building)
    {
        //check this building with all other withing given distance
        foreach (Building other in this.BuildingsList)
            if (Vector3.Distance (building.Center, other.Center) > 25f)
                continue;
            else if (building.Intersects (other))
                return false;

        if (this.IntersectsRoad (building))
            return false;

        return true;
    }