Esempio n. 1
0
 public override void Dispose()
 {
     base.Dispose();
     if (textures != null)
     {
         textures.Clear();
     }
     if (collisionChecker != null)
     {
         collisionChecker.Dispose();
         collisionChecker = null;
     }
     if (objects != null)
     {
         Object[] o = objects.ToActors();
         for (int i = 0; i < o.Length; i++)
         {
             Actor actor = (Actor)o[i];
             if (actor != null)
             {
                 actor.Dispose();
                 actor = null;
             }
         }
     }
     if (batch != null)
     {
         batch.Dispose();
     }
 }