//坐骑等级配置config private void GetRideLevelConfig() { List <SXML> xml = XMLMgr.instance.GetSXMLList("ride.lvl_info"); foreach (SXML x in xml) { LevelConfigVo lvlvo = new LevelConfigVo(); lvlvo.attMappingLst = new Dictionary <int, List <AttConfigVo> >(); lvlvo.lvl = x.getInt("lvl"); lvlvo.exp = x.getInt("exp"); lvlvo.speed = x.getFloat("speed"); lvlvo.dressment = x.getInt("dressment"); //if ( lvlvo.exp == -1 && maxExp == 0 ) //{ // if ( levelMapping.ContainsKey( lvlvo.lvl -1 ) ) // { // maxExp = ( levelMapping[ lvlvo.lvl - 1 ] as LevelConfigVo ).exp; // } //} foreach (SXML _carr_att in x.GetNodeList("carr_att")) { int carr = _carr_att.getInt("carr"); List <AttConfigVo> attLst = new List <AttConfigVo>(); foreach (SXML _x in _carr_att.GetNodeList("att")) { AttConfigVo att = new AttConfigVo(); att.att_type = _x.getInt("att_type"); att.add = _x.getInt("add"); attLst.Add(att); if (!lvlvo.attMappingLst.ContainsKey(carr)) { lvlvo.attMappingLst.Add(carr, attLst); } else { lvlvo.attMappingLst[carr] = attLst; } } } AddMapping(lvlvo.lvl, levelMapping, lvlvo); } //if ( maxExp == 0 ) //{ // Debug.LogError("没有匹配到最大exp值"); //} }
private void SetGameObjectData(GameObject item, AttConfigVo vo, GameObject parent) { Text text_name = item.transform.FindChild("text_name").GetComponent <Text>(); Text text_value = item.transform.FindChild("text_value").GetComponent <Text>(); //text_name.text = Globle.getAttrNameById( vo.att_type ); text_name.text = Globle.getString(vo.att_type + "_" + PlayerModel.getInstance().profession); text_value.text = vo.add + ""; item.SetActive(true); item.transform.SetParent(parent.transform); item.transform.localScale = Vector3.one; }
//坐骑灵性配置config private void GetRideGiftConig() { List <SXML> xml = XMLMgr.instance.GetSXMLList("ride.gift_info"); foreach (SXML x in xml) { RideGiftConfigVo lvlvo = new RideGiftConfigVo(); lvlvo.attMaping = new Dictionary <int, List <AttConfigVo> >(); lvlvo.lvl = x.getInt("lvl"); lvlvo.num = x.getInt("num"); List <SXML> typeLst = x.GetNodeList("gift_type"); foreach (SXML currGift in typeLst) { int type = currGift.getInt("type"); List <AttConfigVo> attLst = new List <AttConfigVo>(); foreach (SXML _x in currGift.GetNodeList("att")) { AttConfigVo att = new AttConfigVo(); att.att_type = _x.getInt("att_type"); att.add = _x.getInt("add"); attLst.Add(att); } if (lvlvo.attMaping.ContainsKey(type)) { lvlvo.attMaping[type] = attLst; } else { lvlvo.attMaping.Add(type, attLst); } } AddMapping(lvlvo.lvl, rideGiftMapping, lvlvo); } }
//坐骑灵性maxlvl 奖励 private void GetRideMaxGiftConig() { List <SXML> xml = XMLMgr.instance.GetSXMLList("ride.max_gift"); foreach (SXML x in xml) { RideMaxGiftConfigVo maxGift = new RideMaxGiftConfigVo(); maxGift.attLst = new List <AttConfigVo>(); maxGift.type = x.getInt("type"); maxGift.max = x.getInt("max"); maxGift.desc = x.getString("desc"); foreach (SXML _x in x.GetNodeList("att")) { AttConfigVo attVo = new AttConfigVo(); attVo.att_type = _x.getInt("att_type"); attVo.add = _x.getInt("add"); } AddMapping(maxGift.type, rideMaxGiftMapping, maxGift); } }