Пример #1
0
 public void SetData(XmlElement xml)
 {//通过读取xml表来给道具赋值
     id      = xml.GetAttribute("id");
     name    = xml.GetAttribute("name");
     type    = xml.GetAttribute("type");
     power   = XmlTools.GetIntAttribute(xml, "power");
     sprite  = xml.GetAttribute("spriteName");
     explain = xml.GetAttribute("explain");
 }
Пример #2
0
 public void SetData(XmlElement xml)
 {//从xml表中的数据给魔法赋值
     id      = xml.GetAttribute("id");
     name    = xml.GetAttribute("name");
     power   = float.Parse(xml.GetAttribute("power"));
     needMp  = XmlTools.GetIntAttribute(xml, "needMp");
     type    = xml.GetAttribute("type");
     explain = xml.GetAttribute("explain");
 }
Пример #3
0
 public void SetData(XmlElement xml)
 {
     enemyID  = xml.GetAttribute("enemyID");
     name     = xml.GetAttribute("name");
     hp       = XmlTools.GetIntAttribute(xml, "hp");
     atk      = XmlTools.GetIntAttribute(xml, "atk");
     sp       = XmlTools.GetIntAttribute(xml, "sp");
     aDef     = XmlTools.GetIntAttribute(xml, "aDef");
     mDef     = XmlTools.GetIntAttribute(xml, "mDef");
     lostItem = xml.GetAttribute("lostItem");
     explain  = xml.GetAttribute("explain");
 }
Пример #4
0
 public void SetData(XmlElement xml)
 {
     id    = xml.GetAttribute("ID");
     name  = xml.GetAttribute("name");
     hp    = XmlTools.GetIntAttribute(xml, "hp");
     maxHp = XmlTools.GetIntAttribute(xml, "maxHp");
     sp    = XmlTools.GetIntAttribute(xml, "sp");
     maxSp = XmlTools.GetIntAttribute(xml, "maxSp");
     str   = XmlTools.GetIntAttribute(xml, "str");
     magic = XmlTools.GetIntAttribute(xml, "magic");
     def   = XmlTools.GetIntAttribute(xml, "Def");
     agile = XmlTools.GetIntAttribute(xml, "agile");
 }