Ejemplo n.º 1
0
    public SpineImageData(string folderPath, SpineStyleData style)
    {
        enable          = true;
        this.folderPath = folderPath;
        this.style      = style;
        name            = Path.GetFileName(folderPath);
        folderImages    = folderPath + "/images";



        if (!Directory.Exists(folderImages))
        {
            Console.WriteLine($"【警告】 不存在 {folderImages}");
            enable = false;
        }


        genergateFolderPath = folderPath;
        if (Setting.Options.useGenerate)
        {
            genergateFolderPath = Setting.Options.rootGenerates + "/" + style.name + "/" + name;
        }

        genergateFolderImages = genergateFolderPath + "/images";
        genergateFileSpine    = genergateFolderPath + "/" + style.spineFileName;
        folderExportSpine     = Setting.Options.rootExportSpine + "/" + style.name + "/" + name;


        if (enable)
        {
            readImages();
        }
    }
Ejemplo n.º 2
0
    // 读取样式
    public void ReadStyles()
    {
        DirectoryInfo directory = new DirectoryInfo(Setting.Options.rootEditor);

        DirectoryInfo[] infos = directory.GetDirectories();
        foreach (DirectoryInfo item in infos)
        {
            SpineStyleData style = new SpineStyleData(item.FullName);
            if (style.enable)
            {
                styleList.Add(style);
            }
        }
    }