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); } } } }
public void FindObstaclesInBox(AxisAlignedBox box, CollisionTileManager.AddTreeObstaclesCallback callback) { foreach ( Boundary boundary in boundaries ) { boundary.FindObstaclesInBox(box, callback); } }
// This entrypoint is invoked by the higher-level client to // set up the collision tile manager public void SetCollisionInterface(CollisionAPI API, float tileSize) { collisionTileManager = new CollisionTileManager(API, tileSize, FindObstaclesInBox); }
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) { if (box.Intersects(bounds)) { foreach (Tree t in trees) { t.FindObstaclesInBox(box, callback); } } }