public void LoadTextures(TextureDictionary txd) { if (TextureName.Length > 0) { if (txd.Contains(TextureName, TextureType.Diffuse)) { Texture = txd[TextureName, TextureType.Diffuse]; } else { Texture = Texture2D.Missing; } } if (MaskName.Length > 0) { if (txd.Contains(MaskName, TextureType.Mask)) { Mask = txd[MaskName, TextureType.Mask]; } else { Mask = null; } } }