Exemplo n.º 1
0
        /// <summary>
        /// Removes a texture from our manager list
        /// </summary>
        /// <param name="name">The texture name</param>
        public static void RemoveTexture(string name)
        {
            InfTexture texture = null;

            if (!String.IsNullOrEmpty(name))
            {
                if (_textures.TryGetValue(name, out texture))
                {
                    texture.UnloadContent();
                    _textures.Remove(name);
                    _texturesLoaded--;
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Removes a texture from our manager list
 /// </summary>
 /// <param name="texture">Our Texture Object</param>
 public static void RemoveTexture(InfTexture texture)
 {
     if (_textures.ContainsValue(texture))
     {
         foreach (InfTexture text in _textures.Values)
         {
             if (text == texture)
             {
                 string filename = text.FileName;
                 texture.UnloadContent();
                 _textures.Remove(filename);
                 _texturesLoaded--;
             }
         }
     }
 }