internal static Dictionary<string, Texture2D> GetTextures(GraphicsDevice gd, IFileProvider provider) { var textures = new Dictionary<string, Texture2D>(); foreach (var f in provider.GetFiles()) { var img = new Bitmap(new MemoryStream(provider.GetData(f))); textures.Add(f, DrawingHelper.BitmapToTexture(gd, img)); } return textures; }
internal static Dictionary <string, Texture2D> GetTextures(GraphicsDevice gd, IFileProvider provider) { var textures = new Dictionary <string, Texture2D>(); foreach (var f in provider.GetFiles()) { var img = new Bitmap(new MemoryStream(provider.GetData(f))); textures.Add(f, DrawingHelper.BitmapToTexture(gd, img)); } return(textures); }
internal static Dictionary <string, Texture2D> GetTextures(GraphicsDevice gd, IFileProvider provider) { Dictionary <string, Texture2D> dictionary = new Dictionary <string, Texture2D>(); string[] files = provider.GetFiles(); for (int i = 0; i < files.Length; i++) { string text = files[i]; Bitmap img = new Bitmap(new MemoryStream(provider.GetData(text))); dictionary.Add(text, ContentLoader.BitmapToTexture(gd, img)); } return(dictionary); }