Пример #1
0
 public override void Dispose()
 {
     if (usePhysics)
     {
         _manager.SetStart(false);
         _manager.SetEnableGravity(false);
         _Bodys.Clear();
     }
     this.keySize = 0;
     if (batch != null)
     {
         batch.Dispose();
         batch = null;
     }
     if (content != null)
     {
         content.Dispose();
         content = null;
     }
     if (indexTile != null)
     {
         indexTile.Dispose();
         indexTile = null;
     }
     if (objects != null)
     {
         objects.Clear();
         objects = null;
     }
     if (pendingAdd != null)
     {
         pendingAdd.Clear();
         pendingAdd = null;
     }
     if (pendingRemove != null)
     {
         pendingRemove.Clear();
         pendingRemove = null;
     }
     tiles.Clear();
     Close();
 }
Пример #2
0
 public override void Dispose()
 {
     this.keySize = 0;
     if (batch != null)
     {
         batch.Dispose();
         batch = null;
     }
     if (content != null)
     {
         content.Dispose();
         content = null;
     }
     if (indexTile != null)
     {
         indexTile.Dispose();
         indexTile = null;
     }
     if (objects != null)
     {
         objects.Clear();
         objects = null;
     }
     if (pendingAdd != null)
     {
         pendingAdd.Clear();
         pendingAdd = null;
     }
     if (pendingRemove != null)
     {
         pendingRemove.Clear();
         pendingRemove = null;
     }
     tiles.Clear();
     Close();
 }