using UnityEngine; using System.Collections; using System.Xml; public class UAVData { public int id; public string name; public string description; public int equip; public int attack; public int[] powers; public string model; public UAVData(XmlElement node = null) { if(node == null) return; id = StringUtil.ToInt (node.GetAttribute("id")); name = node.GetAttribute ("name"); description = node.GetAttribute ("description"); equip = StringUtil.ToInt (node.GetAttribute("equip")); attack = StringUtil.ToInt (node.GetAttribute("attack")); powers = StringUtil.SplitToInt (node.GetAttribute("power"), '|'); model = node.GetAttribute ("model"); } }