1234567891011121314151617181920212223242526272829303132 |
- 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");
- }
- }
|