Exemplo n.º 1
0
 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);
 }
Exemplo n.º 4
0
 public void FindObstaclesInBox(AxisAlignedBox box,
                                CollisionTileManager.AddTreeObstaclesCallback callback)
 {
     foreach (TreeGroup group in groups)
     {
         group.FindObstaclesInBox(box, callback);
     }
 }
Exemplo n.º 5
0
        public void FindObstaclesInBox(AxisAlignedBox box,
									   CollisionTileManager.AddTreeObstaclesCallback callback)
        {
            if (box.Intersects(location))
                callback(speedTree);
        }
Exemplo n.º 6
0
        public void FindObstaclesInBox(AxisAlignedBox box,
									   CollisionTileManager.AddTreeObstaclesCallback callback)
        {
            if (box.Intersects(bounds))
            {
                foreach (Tree t in trees)
                {
                    t.FindObstaclesInBox(box, callback);
                }
            }
        }