BuffData.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Xml;
  4. public class BuffData
  5. {
  6. public int id;
  7. public string name;
  8. public string description;
  9. public int target;
  10. public int is_good;
  11. public int is_normal;
  12. public int[] buff_type;
  13. public float duration;
  14. public int[] value;
  15. public int[] value_type;
  16. public string g_effect;
  17. public string s_effect;
  18. public int[] removeArr;
  19. public int end;
  20. public int[] endBuffArr;
  21. public BuffData(XmlNode node = null)
  22. {
  23. if(node == null)
  24. return;
  25. id = StringUtil.ToInt(node.Attributes["id"].Value);
  26. name = node.Attributes["name"].Value;
  27. description = node.Attributes["description"].Value;
  28. target = StringUtil.ToInt(node.Attributes["target"].Value);
  29. is_good = StringUtil.ToInt(node.Attributes["is_good"].Value);
  30. is_normal = StringUtil.ToInt(node.Attributes["is_normal"].Value);
  31. buff_type = StringUtil.SplitToInt(node.Attributes["buff_type"].Value, '|');
  32. duration = StringUtil.ToFloat(node.Attributes["duration"].Value);
  33. value = StringUtil.SplitToInt(node.Attributes["value"].Value, '|');
  34. value_type = StringUtil.SplitToInt(node.Attributes["value_type"].Value, '|');
  35. removeArr = StringUtil.SplitToInt(node.Attributes["remove"].Value, '|');
  36. endBuffArr = StringUtil.SplitToInt(node.Attributes["end_buff"].Value, '|');
  37. end = StringUtil.ToInt(node.Attributes["end"].Value);
  38. g_effect = node.Attributes["g_effect"].Value;
  39. s_effect = node.Attributes["s_effect"].Value;
  40. }
  41. }