/// <summary> /// 获取孔描述 /// </summary> /// <param name="info"></param> /// <returns></returns> private string GetGemDesc(HoldInfo info) { string des = ""; switch (info.m_type) { case Hold_STATE.EQUIP: PropFightInfo prop_fight = PropChangeFightConfig.GetEquipInfo(info.m_info.propType); string name = TextManager.GetItemString(info.m_gem_id.ToString()); string value = prop_fight.IsPercent == 0 ? info.m_info.propValue.ToString() : string.Format("{0}%", info.m_info.propValue * 100); string prop_name = TextManager.GetUIString(info.m_info.propType); des += name + "\n" + prop_name + "+" + value.ToString(); break; case Hold_STATE.EMPTY: des += TextManager.GetUIString("UI2057"); break; case Hold_STATE.CAN_OPEN: des += TextManager.GetUIString("UI2056"); break; case Hold_STATE.MATERIAL_LOCK: des += TextManager.GetUIString("UI2055"); break; case Hold_STATE.NOT_OPEN_LOCK: des += TextManager.GetUIString("UI2058"); break; } return(des); }
/// <summary> /// 设置属性信息 /// </summary> private void SetPropInfo() { float fight = 0; List <EquipAddInfo> prop_list = EquipConfig.GetPropAddDataListByID(-1, int.Parse(select_equip.itemID), select_equip.star, select_equip.strongLevel); for (int i = 0; i < prop_list.Count; i++) { EquipAddInfo info = prop_list[i]; PropFightInfo prop_fight = PropChangeFightConfig.GetEquipInfo(info.prop_name); string prop_name_label = string.Format("prop_name_{0}", i.ToString()); UILabel prop_name = UtilTools.GetChild <UILabel>(panel.equipProp, prop_name_label); prop_name.text = TextManager.GetUIString(info.prop_name); string prop_txt_label = string.Format("prop_value_{0}", i.ToString()); UILabel cur_prop_txt = UtilTools.GetChild <UILabel>(panel.equipProp, prop_txt_label); float prop_value = GameConvert.FloatConvert((info.prop_base_value + info.prop_star_value + info.prop_strong_value)); //cur_prop_txt.text = prop_fight.IsPercent==0?prop_value.ToString():string.Format("{0}%", prop_value*100); cur_prop_txt.text = prop_value.ToString(); fight += PropChangeFightConfig.GetPropForFightValue(info.prop_name, prop_value); } UILabel fight_txt = UtilTools.GetChild <UILabel>(panel.equipProp, "fight_value"); fight_txt.text = GameConvert.IntConvert(fight).ToString(); }
/// <summary> /// 设置属性信息 /// </summary> private void SetPropInfo() { float fight = 0; List <EquipAddInfo> prop_list = GetPropAddList(); for (int i = 0; i < prop_list.Count; i++) { EquipAddInfo info = prop_list[i]; string prop_name_label = string.Format("prop_name_{0}", i.ToString()); UILabel prop_name = UtilTools.GetChild <UILabel>(panel.cur_equip, prop_name_label); prop_name.text = TextManager.GetUIString(info.prop_name); string prop_txt_label = string.Format("prop_value_{0}", i.ToString()); UILabel cur_prop_txt = UtilTools.GetChild <UILabel>(panel.cur_equip, prop_txt_label); cur_prop_txt.text = (info.prop_base_value).ToString(); fight += PropChangeFightConfig.GetPropForFightValue(info.prop_name, GameConvert.FloatConvert(info.prop_base_value)); } UILabel fight_txt = UtilTools.GetChild <UILabel>(panel.cur_equip, "fight_value"); fight_txt.text = GameConvert.IntConvert(fight).ToString(); }