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