bool RemoveLeafFromChildren(Leaf leaf)
 {
     Debug.Log("<color=#802030>位置在" + _field.top + "," + _field.right + "," + _field.bottom + "," + _field.left + "的树枝节点从子节点移除位置在" + leaf.position + "半径是" + leaf.radius + "的叶子</color>");
     if (_upperRightChild._field.Contains(leaf.position))
     {
         return(_upperRightChild.RemoveLeaf(leaf));
     }
     if (_lowerRightChild._field.Contains(leaf.position))
     {
         return(_lowerRightChild.RemoveLeaf(leaf));
     }
     if (_lowerLeftChild._field.Contains(leaf.position))
     {
         return(_lowerLeftChild.RemoveLeaf(leaf));
     }
     if (_upperLeftChild._field.Contains(leaf.position))
     {
         return(_upperLeftChild.RemoveLeaf(leaf));
     }
     return(_root.RemoveLeafInTotalTree(leaf));
 }
Exemple #2
0
 public static bool RemoveLeaf(QuadtreeNestedClass <GameObject> .Leaf leaf)
 {
     return(_quadtree.RemoveLeaf(leaf));
 }