public void FindObstaclesInBox(AxisAlignedBox box, CollisionTileManager.AddTreeObstaclesCallback callback) { foreach (TreeGroup group in groups) { group.FindObstaclesInBox(box, callback); } }
public void FindObstaclesInBox(AxisAlignedBox box, CollisionTileManager.AddTreeObstaclesCallback callback) { if (box.Intersects(location)) { callback(speedTree); } }
public void FindObstaclesInBox(AxisAlignedBox box, CollisionTileManager.AddTreeObstaclesCallback callback) { Debug.Assert(bounds != null, "When calling FindObstaclesInBox, bounds must be non-null"); if (bounds.Intersects(box)) { foreach (IBoundarySemantic semantic in semantics) { Forest f = semantic as Forest; if (f != null) { f.FindObstaclesInBox(box, callback); } } } }