static void LoadClothesConfig(AssetBundles.NormalRes data) { byte[] asset = (data as AssetBundles.BytesRes).m_bytes; if (asset == null) { return; } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return; } List <TbXmlNode> xmlNodeList = docNode.GetNodes("Object/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return; } ClothesInfo info; for (int i = 0; i < xmlNodeList.Count; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; info = new ClothesInfo(); info.configID = node.GetIntValue("id"); info.addValue = node.GetStringValue("addvalue"); info.lockAdd = node.GetStringValue("lockadd"); info.initstar = node.GetIntValue("initstar"); info.type = node.GetIntValue("type"); info.lockLevel = node.GetIntValue("locklevel"); info.maxLevel = node.GetIntValue("maxlevel"); info.maxstar = node.GetIntValue("maxstar"); info.worthValue = node.GetIntValue("worthvalue"); info.percentType = node.GetIntValue("percenttype"); if (configList.ContainsKey(info.configID)) { configList[info.configID] = info; } else { configList.Add(info.configID, info); } } asset = null; }
public ImageVisibilityCommand(ClothesInfo m) { M = m; }