Example #1
0
 /// <summary>
 /// Deletes All trees subelements. Releases
 /// all the corresponding texture tiles.
 /// </summary>
 public void RecursiveDeleteChildren(TileSampler owner)
 {
     if (Children[0] != null)
     {
         for (int i = 0; i < 4; i++)
         {
             Children[i].RecursiveDelete(owner);
             Children[i] = null;
         }
     }
 }
Example #2
0
 /// <summary>
 /// Deletes this Tree and all its subelements. Releases
 /// all the corresponding texture tiles.
 /// </summary>
 public void RecursiveDelete(TileSampler owner)
 {
     if (Tile != null && owner != null)
     {
         owner.Producer.PutTile(Tile);
         Tile = null;
     }
     if (Children[0] != null)
     {
         for (int i = 0; i < 4; i++)
         {
             Children[i].RecursiveDelete(owner);
             Children[i] = null;
         }
     }
 }