Пример #1
0
        /// <summary>
        /// Sets the appropriate names for the atlas data file and png file as well as the tps filename.
        /// </summary>
        private void SetupFile()
        {
            var filename = FileManager.RemoveExtension(FileManager.RemovePath(GlueState.Self.CurrentGlueProjectFileName));

            dataStructMapStruct classStruct = null;
            dataStructMapStruct dataStruct  = null;

            for (var i = 0; i < DataFileNames.items.Length; i++)
            {
                if (DataFileNames.items[i] as string == "classfile")
                {
                    classStruct = DataFileNames.items[i + 1] as dataStructMapStruct;
                }
                if (DataFileNames.items[i] as string == "datafile")
                {
                    dataStruct = DataFileNames.items[i + 1] as dataStructMapStruct;
                }
            }

            if (classStruct != null)
            {
                classStruct.filename = filename + ".cs";
            }
            if (dataStruct != null)
            {
                dataStruct.filename = filename + "{v}.atlas";
            }
            TextureFileNames = filename + "{v}.png";

            var filenameIndex = IndexInItems("fileName");

            @struct.Items[filenameIndex + 1] = Filename;
        }