Beispiel #1
0
        private List<TextureInfo> CopyTextures(BlockInfo info, List<VirtualFile> files)
        {
            string assetsFolder = Path.Combine(outputFolder, "Assets", AssemblyName);
            List<TextureInfo> newinfos = new List<TextureInfo>();

            int i = 1;
            foreach (var tex in info.TextureInfos)
            {
                string newFilename = Path.Combine(assetsFolder, info.ToFileNameString() + $"_{i}.png");
                byte[] content = File.ReadAllBytes(tex.FileName);
                files.Add(new VirtualFile()
                {
                    FileName = newFilename,
                    Content = content
                });
                TextureInfo newtex = tex;
                newtex.FileName = newFilename;
                newinfos.Add(newtex);
                i++;
            }

            return newinfos;
        }
 public CreateBlockForm()
 {
     BlockInfo = new BlockInfo();
     BlockInfo.TextureInfos = new List<TextureInfo>();
     InitializeComponent();
 }