Beispiel #1
0
        public void SaveBulletFile(String aFilePath, Entity.BulletData aBulletData, Entity.BulletListXml aBulletList)
        {
            myFilePath      = aFilePath;
            myBulletData    = aBulletData;
            myBulletListXml = aBulletList;

            string dataFolder = StringUtilities.GetDataFolderPath(aFilePath);

            dataFolder = dataFolder.Replace("Data/", "");
            string projectileListPath = dataFolder + "Data/Script/LI_list_projectile.xml";

            XmlWriterSettings settings = new XmlWriterSettings();

            settings.OmitXmlDeclaration = true;
            settings.Indent             = true;

            using (XmlWriter writer = XmlWriter.Create(myFilePath, settings))
            {
                WriteBulletFile(writer);
            }

            using (XmlWriter writer = XmlWriter.Create(projectileListPath, settings))
            {
                WriteBulletListFile(writer, myFilePath);
            }
        }
Beispiel #2
0
        public void SaveBulletFile(String aFilePath, Entity.BulletData aBulletData, Entity.BulletListXml aBulletList)
        {
            myFilePath = aFilePath;
            myBulletData = aBulletData;
            myBulletListXml = aBulletList;

            string dataFolder = StringUtilities.GetDataFolderPath(aFilePath);
            dataFolder = dataFolder.Replace("Data/", "");
            string projectileListPath = dataFolder + "Data/Script/LI_list_projectile.xml";

            XmlWriterSettings settings = new XmlWriterSettings();
            settings.OmitXmlDeclaration = true;
            settings.Indent = true;

            using (XmlWriter writer = XmlWriter.Create(myFilePath, settings))
            {
                WriteBulletFile(writer);
            }

            using (XmlWriter writer = XmlWriter.Create(projectileListPath, settings))
            {
                WriteBulletListFile(writer, myFilePath);
            }
        }
 private void BulletDropDown_SelectIndex_Changed(object sender, EventArgs e)
 {
     myBulletData = myLoadedBullets[myBulletTypes.GetDropDown().SelectedIndex];
     LoadSettings();
 }
 private void BulletDropDown_SelectIndex_Changed(object sender, EventArgs e)
 {
     myBulletData = myLoadedBullets[myBulletTypes.GetDropDown().SelectedIndex];
     LoadSettings();
 }