Ejemplo n.º 1
0
        /**
         * @brief 私有提取函数
         *
         * @return
         */
        private List <Data_ActionInfo> ExtractAction(DBC_Row node, string prefix)
        {
            List <Data_ActionInfo> data = new List <Data_ActionInfo>();

            List <string> childList = DBCUtil.ExtractNodeByPrefix(node, prefix);

            if (childList.Count == 0)
            {
                return(data);
            }

            foreach (string child in childList)
            {
                if (string.IsNullOrEmpty(child))
                {
                    continue;
                }

                string outModelPath;
                string outSoundId;
                if (!_ParseModelPath(child, out outModelPath, out outSoundId))
                {
                    string info = "[Err]:ActionConfigProvider.ExtractAction anim name error:" + child;
                    throw new Exception(info);
                }

                Data_ActionInfo action = new Data_ActionInfo();
                action.m_AnimName = m_ActionPrefix + outModelPath;
                action.m_SoundId  = outSoundId;
                data.Add(action);
            }

            return(data);
        }