UAVData.cs 685 B

1234567891011121314151617181920212223242526272829303132
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Xml;
  4. public class UAVData
  5. {
  6. public int id;
  7. public string name;
  8. public string description;
  9. public int equip;
  10. public int attack;
  11. public int[] powers;
  12. public string model;
  13. public UAVData(XmlElement node = null)
  14. {
  15. if(node == null)
  16. return;
  17. id = StringUtil.ToInt (node.GetAttribute("id"));
  18. name = node.GetAttribute ("name");
  19. description = node.GetAttribute ("description");
  20. equip = StringUtil.ToInt (node.GetAttribute("equip"));
  21. attack = StringUtil.ToInt (node.GetAttribute("attack"));
  22. powers = StringUtil.SplitToInt (node.GetAttribute("power"), '|');
  23. model = node.GetAttribute ("model");
  24. }
  25. }