T[] GetCollisionObjectsFromAChild(Vector2 checkPoint, float checkRadius, QuadtreeUpdate <T> child)
 {
     if (child._field.PointToFieldDistance(checkPoint) <= _maxRadius + checkRadius) //这里不光要考虑到检测半径,还要考虑到节点最大半径
     {
         return(child.CheckCollision(checkPoint, checkRadius));
     }
     return(new T[0]);
 }
コード例 #2
0
 public static GameObject[] CheckCollision(Vector2 checkPoint, float checkRadius)
 {
     return(_quadtree.CheckCollision(checkPoint, checkRadius));
 }