T[] GetCollisionObjectsFromAChild(Vector2 checkPoint, float checkRadius, QuadtreeDataUpwards <T> child) { if (child._field.PointToFieldDistance(checkPoint) <= _maxRadius + checkRadius) //这里不光要考虑到检测半径,还要考虑到节点最大半径 { return(child.DoCheckCollision(checkPoint, checkRadius)); } return(new T[] { }); }
public T[] CheckCollision(Vector2 checkPoint, float checkRadius) { return(_root.DoCheckCollision(checkPoint, checkRadius)); }