コード例 #1
0
        public static SystemsDamage Load(string path)
        {
            SystemsDamage systemsDamage = new SystemsDamage();

            using (var xml = new XMLParser(path, "STRUCTURE"))
            {
                var systems = xml.GetNode("SYSTEMS");

                foreach (XmlNode system in systems.ChildNodes)
                {
                    systemsDamage.systemUnits.Add(new SystemsDamageSystemUnit(system));
                }
            }

            return systemsDamage;
        }
コード例 #2
0
        public static Structure Load(string path)
        {
            Structure structure = new Structure();

            using (var xml = new XMLParser(path, "STRUCTURE"))
            {
                structure.characteristics = StructureCharacteristicsCode.Parse(xml.GetNode("CHARACTERISTICS").FirstChild.InnerText);
                structure.root = new StructurePart(xml.GetNode("ROOT"));
            }

            return structure;
        }