コード例 #1
0
        public void Initialize(ContentManager content)
        {
            textures = new Dictionary <string, Texture2D>();

            string path = "gfx/panels/";

            List <String> fileArray = Scripting.getFilesFromFolder(path);

            foreach (string t in fileArray)
            {
                textures.Add(t, Scripting.loadImage(path + t + ".png"));
            }
        }
コード例 #2
0
        public static Dictionary <string, Texture2D> loadImageFolder(string path)
        {
            Dictionary <string, Texture2D> dictionary = new Dictionary <string, Texture2D>();

            List <String> fileArray = Scripting.getFilesFromFolder(path);

            foreach (string t in fileArray)
            {
                dictionary.Add(t, loadImage(path + t + ".png"));
            }

            return(dictionary);
        }