123456789101112131415161718192021222324252627282930313233343536 |
- using UnityEngine;
- using System.Collections;
- using System.Xml;
- public class ShopData
- {
- public int id;
- public string name;
- public string description;
- public string code;
- public string value;
- public int sort;
- public string price;
- public int platform;
- public int type;
- public string icon;
- public ShopData(XmlNode node = null)
- {
- if(node == null)
- return;
-
- id = StringUtil.ToInt(node.Attributes["id"].Value);
- name = node.Attributes["name"].Value;
- description = node.Attributes["description"].Value;
- type = StringUtil.ToInt(node.Attributes["type"].Value);
- code = node.Attributes["code"].Value;
- value = node.Attributes ["value"].Value;
- sort = StringUtil.ToInt(node.Attributes["sort"].Value);
- platform = StringUtil.ToInt(node.Attributes["platform"].Value);
- price = node.Attributes["price"].Value;
- icon = node.Attributes["icon"].Value;
- }
- }
|