AoMEngineLibrary.Graphics.Grn.Nodes.GrnMeshFieldNode.CreateFolderFile C# (CSharp) Method

CreateFolderFile() public method

public CreateFolderFile ( string folder ) : void
folder string
return void
        public override void CreateFolderFile(string folder)
        {
            XDocument doc = new XDocument();
            XElement root = new XElement("meshField", new XAttribute("count", this.TextureCoordinates.Count));
            doc.Add(root);

            root.Add(new XElement("unknown", this.Unknown));
            for (int i = 0; i < this.TextureCoordinates.Count; ++i)
            {
                root.Add(new XElement("texCoord", new XAttribute("index", i), this.TextureCoordinates[i]));
            }

            string fileName = System.IO.Path.Combine(folder, "meshField.xml");
            using (FileStream stream = System.IO.File.Create(fileName))
            {
                doc.Save(stream);
            }
        }