示例#1
0
        public static void AddDestination(string text, int index, Abstract.IModification modification = null)
        {
            if (modification != null)
            {
                DestinationsAccompanyingActions.Add(text, modification);
            }

            Destinations.Add(text, index);
        }
示例#2
0
        public Option OptionParseWithDo(XmlNode xmlOption, Abstract.IModification modification)
        {
            Option option = OptionsTemplate(xmlOption);

            if (xmlOption.Attributes["Do"] != null)
            {
                option.Do = Game.Xml.ModificationParse(xmlOption, modification, name: "Do");
            }

            return(option);
        }
示例#3
0
        public static Abstract.IModification ModificationParse(XmlNode xmlNode, Abstract.IModification modification, string name = "Name")
        {
            if (xmlNode == null)
            {
                return(null);
            }

            modification.Name        = StringParse(xmlNode.Attributes[name]);
            modification.Value       = IntParse(xmlNode.Attributes["Value"]);
            modification.ValueString = StringParse(xmlNode.Attributes["ValueString"]);

            return(modification);
        }