bool LoadEffectProperty() { byte[] asset = ResourceManager.Instance.GetXml("effectconfig"); if (asset == null) { return(false); } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return(false); } List <TbXmlNode> xmlNodeList = docNode.GetNodes("effectconfig/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return(false); } for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; EffectProperty ep = new EffectProperty(); int effectId = UtilTools.IntParse(node.GetStringValue("No")); ep.mEffectId = effectId; ep.mEffectModel = UtilTools.IntParse(node.GetStringValue("Model")); ep.mEffectAction = node.GetStringValue("active"); ep.mEffectFile = node.GetStringValue("FileName"); ep.mEffectPath = node.GetStringValue("Path"); ep.mEffectRemovePath = node.GetStringValue("RemoveEffect"); ep.mEffectFollowAction = node.GetIntValue("FollowAction") == 1 ? true : false; ep.mEffectDirectionType = (EffectDirectionType)UtilTools.IntParse(node.GetStringValue("EffectDirectionType")); ep.mEffectDirectionDistance = UtilTools.FloatParse(node.GetStringValue("EffectDirectionDistance")); ep.mEffectFollowRole = UtilTools.BoolParse(node.GetStringValue("EffectRotation")); ep.mEffectFollowBip = UtilTools.BoolParse(node.GetStringValue("EffectFollowBip")); mEffectPropertyDic.Add(effectId, ep); } return(true); }