1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using UnityEngine;
- using System.Collections;
- using System.Xml;
- public class PowerData
- {
-
- public int id;
- public string name;
- public string description;
- public int type;
- public int effect;
- public int crystal;
- public float distance;
- public float cd;
- public int numBullets;
- public float bulletsInterval;
- public int target;
- public string target_type;
- public int target_limit;
- public int target_sort;
- public float value;
- public int value_type;
- public int decay;
- public int buff;
- public int shake;
- public string g_effect;
- public string s_effect;
- public string g_hit;
- public string s_hit;
- public string icon;
-
- public PowerData(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);
- crystal = StringUtil.ToInt(node.Attributes["crystal"].Value);
- effect = StringUtil.ToInt(node.Attributes["effect"].Value);
- distance = StringUtil.ToFloat(node.Attributes["distance"].Value);
- cd = StringUtil.ToFloat(node.Attributes["cd"].Value);
- numBullets = StringUtil.ToInt(node.Attributes["bnum"].Value);
- bulletsInterval = StringUtil.ToFloat(node.Attributes["binterval"].Value);
- target = StringUtil.ToInt(node.Attributes["target"].Value);
- target_type = node.Attributes["target_type"].Value;
- target_limit = StringUtil.ToInt(node.Attributes["target_lim"].Value);
- target_sort = StringUtil.ToInt(node.Attributes["target_sort"].Value);
- value = StringUtil.ToFloat(node.Attributes["value"].Value);
- value_type = StringUtil.ToInt(node.Attributes["value_type"].Value);
- decay = StringUtil.ToInt(node.Attributes["decay"].Value);
- buff = StringUtil.ToInt(node.Attributes["buff"].Value);
- shake = StringUtil.ToInt(node.Attributes["shake"].Value);
- g_effect = node.Attributes["g_effect"].Value;
- s_effect = node.Attributes["s_effect"].Value;
- g_hit = node.Attributes["g_hit"].Value;
- s_hit = node.Attributes["s_hit"].Value;
- icon = node.Attributes["icon"].Value;
- }
-
- }
|