ShopData.cs 874 B

123456789101112131415161718192021222324252627282930313233343536
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Xml;
  4. public class ShopData
  5. {
  6. public int id;
  7. public string name;
  8. public string description;
  9. public string code;
  10. public string value;
  11. public int sort;
  12. public string price;
  13. public int platform;
  14. public int type;
  15. public string icon;
  16. public ShopData(XmlNode node = null)
  17. {
  18. if(node == null)
  19. return;
  20. id = StringUtil.ToInt(node.Attributes["id"].Value);
  21. name = node.Attributes["name"].Value;
  22. description = node.Attributes["description"].Value;
  23. type = StringUtil.ToInt(node.Attributes["type"].Value);
  24. code = node.Attributes["code"].Value;
  25. value = node.Attributes ["value"].Value;
  26. sort = StringUtil.ToInt(node.Attributes["sort"].Value);
  27. platform = StringUtil.ToInt(node.Attributes["platform"].Value);
  28. price = node.Attributes["price"].Value;
  29. icon = node.Attributes["icon"].Value;
  30. }
  31. }