void ShowEquipStrenExp(GameItem equip) { m_CompareStrenExpTitle.gameObject.SetActive(true); m_CompareStrenExp.gameObject.SetActive(true); m_CompareStrenExpInfo.gameObject.SetActive(true); int nEnchanceExpMax = equip.GetEnchanceExpMax(); if (nEnchanceExpMax > 0) { m_CompareStrenExp.value = (float)(equip.EnchanceExp) / (float)nEnchanceExpMax; m_CompareStrenExpInfo.text = StrDictionary.GetClientDictionaryString("#{3318}", equip.EnchanceExp, nEnchanceExpMax); } else { m_CompareStrenExp.value = 0; m_CompareStrenExpInfo.text = StrDictionary.GetClientDictionaryString("#{3318}", 0, 0); } //腰带不显示强化经验 if (equip.IsBelt()) { m_CompareStrenExpTitle.gameObject.SetActive(false); m_CompareStrenExp.gameObject.SetActive(false); m_CompareStrenExpInfo.gameObject.SetActive(false); } }
void ShowEquipStrenExp(GameItem equip) { if (m_Equip != null && m_Equip.IsValid()) { m_EquipStrenExp.gameObject.SetActive(true); m_EquipStrenExpInfo.gameObject.SetActive(true); m_EquipStrenExpTitle.gameObject.SetActive(true); int nEnchanceExpMax = equip.GetEnchanceExpMax(); if (nEnchanceExpMax > 0) { m_EquipStrenExp.value = (float)(equip.EnchanceExp) / (float)nEnchanceExpMax; m_EquipStrenExpInfo.text = StrDictionary.GetClientDictionaryString("#{3318}", equip.EnchanceExp, nEnchanceExpMax); } else { m_EquipStrenExp.value = 0; m_EquipStrenExpInfo.text = StrDictionary.GetClientDictionaryString("#{3318}", 0, 0); } //腰带不显示强化经验 强化满级不显示强化经验 if (equip.IsBelt() || equip.EnchanceLevel >= GlobeVar.EQUIP_ENCHANCE_MAX_LEVEL) { m_EquipStrenExp.gameObject.SetActive(false); m_EquipStrenExpInfo.gameObject.SetActive(false); m_EquipStrenExpTitle.gameObject.SetActive(false); } } }