protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Strength", true, out subEle); subEle.Value = Strength.ToString(); ele.TryPathTo("Perception", true, out subEle); subEle.Value = Perception.ToString(); ele.TryPathTo("Endurance", true, out subEle); subEle.Value = Endurance.ToString(); ele.TryPathTo("Charisma", true, out subEle); subEle.Value = Charisma.ToString(); ele.TryPathTo("Intelligence", true, out subEle); subEle.Value = Intelligence.ToString(); ele.TryPathTo("Agility", true, out subEle); subEle.Value = Agility.ToString(); ele.TryPathTo("Luck", true, out subEle); subEle.Value = Luck.ToString(); }
public void get_en() {//当耐力不足时候恢复耐力用 if (Endurance < 7) { addendurance(1); Debug.Log("回复了耐力" + Endurance.ToString()); } }
public XmlElement Serialize(XmlDocument doc) { XmlElement xmlStats = doc.CreateElement("stats"); xmlStats.SetAttribute("health", Health.ToString()); xmlStats.SetAttribute("maxHealth", MaxHealth.ToString()); xmlStats.SetAttribute("endurance", Endurance.ToString()); xmlStats.SetAttribute("strength", Strength.ToString()); xmlStats.SetAttribute("intelligence", Intelligence.ToString()); xmlStats.SetAttribute("agility", Agility.ToString()); xmlStats.SetAttribute("dexterity", Dexterity.ToString()); xmlStats.SetAttribute("upgradePoint", UpgradePoint.ToString()); return(xmlStats); }
protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("CreatureType", true, out subEle); subEle.Value = CreatureType.ToString(); ele.TryPathTo("Skill/Combat", true, out subEle); subEle.Value = CombatSkill.ToString(); ele.TryPathTo("Skill/Magic", true, out subEle); subEle.Value = MagicSkill.ToString(); ele.TryPathTo("Skill/Stealth", true, out subEle); subEle.Value = StealthSkill.ToString(); ele.TryPathTo("Health", true, out subEle); subEle.Value = Health.ToString(); WriteUnusedXML(ele, master); ele.TryPathTo("Damage", true, out subEle); subEle.Value = Damage.ToString(); ele.TryPathTo("Strength", true, out subEle); subEle.Value = Strength.ToString(); ele.TryPathTo("Perception", true, out subEle); subEle.Value = Perception.ToString(); ele.TryPathTo("Endurance", true, out subEle); subEle.Value = Endurance.ToString(); ele.TryPathTo("Charisma", true, out subEle); subEle.Value = Charisma.ToString(); ele.TryPathTo("Intelligence", true, out subEle); subEle.Value = Intelligence.ToString(); ele.TryPathTo("Agility", true, out subEle); subEle.Value = Agility.ToString(); ele.TryPathTo("Luck", true, out subEle); subEle.Value = Luck.ToString(); }
/// <summary> /// Génère une string représentant une couleur en hexadécimal basé sur les valeurs des stats /// de la couleur. /// </summary> /// <returns>La string générée.</returns> public string GetCodeHex() { return("#" + Force.ToString("X2") + Dexterite.ToString("X2") + Endurance.ToString("X2")); }
/// <inheritdoc/> public override bool DoesModelPassFilter(string filter) => Strength.ToString().Contains(filter) || Magic.ToString().Contains(filter) || Endurance.ToString().Contains(filter) || Agility.ToString().Contains(filter) || Luck.ToString().Contains(filter);