/// <summary> /// Deletes all current textures /// </summary> public static void Reset() { //Texs foreach (DictionaryEntry ent in m_ColorTextures) { if (ent.Value != null) { Texture tex = (Texture)ent.Value; tex.Dispose(); tex = null; } } foreach (DictionaryEntry ent in m_Textures) { if (ent.Value != null) { Texture tex = (Texture)ent.Value; tex.Dispose(); tex = null; } } if (m_NPC != null) { NPC.Dispose(); NPC = null; } if (m_Null != null) { Null.Dispose(); Null = null; } if (m_Mob != null) { Mob.Dispose(); Mob = null; } if (m_AreaCircle != null) { AreaCircle.Dispose(); AreaCircle = null; } if (m_AreaSquare != null) { AreaSquare.Dispose(); AreaSquare = null; } if (m_DefaultObject != null) { DefaultObject.Dispose(); DefaultObject = null; } m_ColorTextures.Clear(); m_Textures.Clear(); GC.Collect(); }