/// <summary> /// 选择被吃的宝宝 /// </summary> /// <param name="item"></param> public void OnChooseMaterialClick(MaterialPartnerItemLogic item) { if (item.Choose) { m_ChoosePartnerGuid.Add(item.GetGuid()); m_ChoosePartnerExp += item.StarExp; } else { m_ChoosePartnerGuid.Remove(item.GetGuid()); m_ChoosePartnerExp -= item.StarExp; } ShowFellowDetail(item.m_fellow); int nTotalStarExp = m_ChoosePartnerExp + m_Fellow.StarExp; m_ChooseMaterialExpSprite.fillAmount = (float)nTotalStarExp / (float)m_Fellow.GetCurStarExpMax(); int addLevel = FellowTool.GetFellowAddStarLevel(m_Fellow.StarLevel, nTotalStarExp); if (addLevel > 0) { m_ChooseMaterialExpCount.gameObject.SetActive(true); m_ChooseMaterialExpCount.text = "x" + addLevel.ToString(); } else { m_ChooseMaterialExpCount.gameObject.SetActive(false); } if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 17) { PartnerFrameLogic.Instance().NewPlayerGuide(18); } }
void UpdateFellowInfo_NextStar(Fellow fellow, int addExp) { int nNewStarExp = fellow.StarExp + addExp; // int nTotalStarExp = nNewStarExp; int addLevel = FellowTool.GetFellowAddStarLevel(fellow.StarLevel, nNewStarExp); // int nNewStarLevel = fellow.StarLevel + addLevel; if (fellow.GetCurStarExpMax() > 0) { //m_MaterialPartnerExpLabel.text = nNewStarExp.ToString() + "/" + fellow.GetCurStarExpMax(); m_MaterialPartnerExpSprite.fillAmount = (float)nNewStarExp / (float)fellow.GetCurStarExpMax(); } else { //m_MaterialPartnerExpLabel.text = ""; m_MaterialPartnerExpSprite.fillAmount = 0; } if (addLevel > 0) { m_MaterialPartnerExpCount.gameObject.SetActive(true); m_MaterialPartnerExpCount.text = "x" + addLevel.ToString(); } else { m_MaterialPartnerExpCount.gameObject.SetActive(false); } }