Esempio n. 1
0
        public override ArrayList getXmlNodeList(SecurityElement config, string itemNode)
        {
            ArrayList itemNodeList = new ArrayList();

            UtilXml.getXmlChildList(config, itemNode, ref itemNodeList);
            return(itemNodeList);
        }
Esempio n. 2
0
        override protected void initImpl(ResItem res)
        {
            base.initImpl(res);

            SecurityParser xmlDoc = new SecurityParser();

            xmlDoc.LoadXml(m_text);

            SecurityElement rootNode     = xmlDoc.ToXml();
            ArrayList       itemMeshList = rootNode.Children;
            SecurityElement itemMesh;

            ArrayList       itemSubMeshList;
            SecurityElement itemSubMesh;
            string          meshName    = "";
            string          subMeshName = "";
            string          bonesList   = "";

            foreach (SecurityElement itemNode1f in itemMeshList)
            {
                itemMesh = itemNode1f;
                UtilXml.getXmlAttrStr(itemMesh, "name", ref meshName);

                itemSubMeshList = itemMesh.Children;
                foreach (SecurityElement itemNode2f in itemSubMeshList)
                {
                    itemSubMesh = itemNode2f;
                    UtilXml.getXmlAttrStr(itemSubMesh, "name", ref subMeshName);
                    UtilXml.getXmlAttrStr(itemSubMesh, "bonelist", ref bonesList);
                    m_boneArr = bonesList.Split(',');
                }
            }

            m_text = "";
        }
Esempio n. 3
0
 public override void parseXml(SecurityElement xmlelem)
 {
     UtilXml.getXmlAttrUInt(xmlelem, "index", ref m_index);
     UtilXml.getXmlAttrUInt(xmlelem, "objid", ref m_objid);
     UtilXml.getXmlAttrUInt(xmlelem, "num", ref m_num);
     UtilXml.getXmlAttrUInt(xmlelem, "price", ref m_price);
     UtilXml.getXmlAttrUInt(xmlelem, "type", ref m_type);
 }
Esempio n. 4
0
        public override void parseXml(SecurityElement xmlelem)
        {
            SecurityElement itemXml = null;

            UtilXml.getXmlChild(xmlelem, "item", ref itemXml);
            UtilXml.getXmlAttrUInt(itemXml, "id", ref m_sceneId);
            UtilXml.getXmlAttrStr(itemXml, "name", ref m_sceneName);
            UtilXml.getXmlAttrStr(itemXml, "res", ref m_levelName);
        }
Esempio n. 5
0
        public virtual ArrayList getXmlNodeList(SecurityElement config, string itemNode)
        {
            SecurityElement objElem = null;

            UtilXml.getXmlChild(config, itemNode, ref objElem);
            ArrayList itemNodeList = objElem.Children;

            return(itemNodeList);
        }
Esempio n. 6
0
        public override void parseXml(SecurityElement xmlelem)
        {
            UtilXml.getXmlAttrUInt(xmlelem, "preparetime", ref m_preparetime);
            UtilXml.getXmlAttrUInt(xmlelem, "roundtime", ref m_roundtime);
            UtilXml.getXmlAttrUInt(xmlelem, "peaceNum", ref m_peaceNum);
            UtilXml.getXmlAttrUInt(xmlelem, "luckyCoin", ref m_luckyCoin);

            UtilXml.getXmlAttrUInt(xmlelem, "tiredCard", ref m_tiredCard);
            UtilXml.getXmlAttrUInt(xmlelem, "lastpreparetime", ref m_lastpreparetime);
            UtilXml.getXmlAttrUInt(xmlelem, "lastroundtime", ref m_lastroundtime);
        }
Esempio n. 7
0
        public void parse(SecurityElement xe)
        {
            string attr = "";

            UtilXml.getXmlAttrStr(xe, "size", ref attr);
            attr = attr.Substring(1, attr.Length - 2);
            char[] split = new char[1];
            split[0] = ',';
            string[] strarr = attr.Split(split);

            m_width  = float.Parse(strarr[0]);
            m_height = float.Parse(strarr[2]);
        }
Esempio n. 8
0
        override public void parseXmlElem(SecurityElement elem_)
        {
            base.parseXmlElem(elem_);

            // 解析攻击特效
            ArrayList attackEffectList = new ArrayList();   // 攻击者攻击特效

            UtilXml.getXmlChildList(elem_, "AttackEffect", ref attackEffectList);
            if (attackEffectList != null)
            {
                m_attackEffectList = new AttackEffectList();
                m_attackEffectList.parseXmlElemList(attackEffectList);
            }
        }
Esempio n. 9
0
        public void parse(SecurityElement xe)
        {
            m_pos    = new Vector3();
            m_rotate = new Quaternion();
            m_scale  = new Vector3();

            UtilXml.getXmlAttrStr(xe, "prefab", ref m_prefab);

            string attr = "";

            UtilXml.getXmlAttrStr(xe, "pos", ref attr);
            attr = attr.Substring(1, attr.Length - 2);
            char[] split = new char[1];
            split[0] = ',';
            string[] strarr = attr.Split(split);

            m_pos.x = float.Parse(strarr[0]);
            m_pos.y = float.Parse(strarr[1]);
            m_pos.z = float.Parse(strarr[2]);

            UtilXml.getXmlAttrStr(xe, "rotate", ref attr);
            attr     = attr.Substring(1, attr.Length - 2);
            split[0] = ',';
            strarr   = attr.Split(split);

            m_rotate.x = float.Parse(strarr[0]);
            m_rotate.y = float.Parse(strarr[1]);
            m_rotate.z = float.Parse(strarr[2]);
            m_rotate.w = float.Parse(strarr[3]);

            UtilXml.getXmlAttrStr(xe, "scale", ref attr);
            attr     = attr.Substring(1, attr.Length - 2);
            split[0] = ',';
            strarr   = attr.Split(split);

            m_scale.x = float.Parse(strarr[0]);
            m_scale.y = float.Parse(strarr[1]);
            m_scale.z = float.Parse(strarr[2]);
        }
Esempio n. 10
0
        public void parseXmlElem(SecurityElement elem_)
        {
            // 解析 Id
            UtilXml.getXmlAttrStr(elem_, "Id", ref m_id);

            // 解析攻击
            ArrayList       attackActionNodeList = elem_.Children; // AttackAction 攻击动作节点,这个节点只有一个 AttackAction
            SecurityElement attackActionNode     = attackActionNodeList[0] as SecurityElement;

            m_attackActionNode = new AttackActionNode();
            m_attackActionNode.parseXmlElem(attackActionNode);

            // 解析被击
            SecurityElement hurtActionNode = null;

            UtilXml.getXmlChild(attackActionNode, "HurtAction", ref hurtActionNode);
            if (hurtActionNode != null)
            {
                m_hurtActionNode = new HurtActionNode();
                m_hurtActionNode.parseXmlElem(hurtActionNode);
            }
        }
Esempio n. 11
0
        protected bool m_needMove;      // 攻击是否需要移动

        virtual public void parseXmlElem(SecurityElement elem_)
        {
            UtilXml.getXmlAttrInt(elem_, "HashId", ref m_HashId);
            UtilXml.getXmlAttrBool(elem_, "NeedMove", ref m_needMove);
        }
Esempio n. 12
0
        protected string m_linkBone;    // 连接的骨头

        virtual public void parseXmlElem(SecurityElement elem_)
        {
            UtilXml.getXmlAttrStr(elem_, "EffectId", ref m_effectId);
            UtilXml.getXmlAttrFloat(elem_, "DelayTime", ref m_delayTime);
            UtilXml.getXmlAttrStr(elem_, "LinkBone", ref m_linkBone);
        }