using UnityEngine; using System.Collections; using System.Collections.Generic; using System.Xml; public class PowerDataManager { public Dictionary dataDict; public PowerDataManager() { dataDict = new Dictionary(); InitByXML("XML/Config/All/power_config"); } public void InitByXML(string path) { TextAsset textAsset = (TextAsset)Resources.Load(path); XmlDocument xml = new XmlDocument(); xml.LoadXml(textAsset.text); XmlNode mapNode = xml.SelectSingleNode("data"); XmlNodeList nodeList = mapNode.SelectNodes("item"); for(int i=0; i