/// <summary> /// 使用宠物蛋后刷新资质经验条 /// </summary> void RefreshExpUsedEgg() { if (GameCenter.mercenaryMng.curUseEggPetId == MercenaryMng.noPet) { return; } int index = GameCenter.mercenaryMng.curUseEggPetId; int id = GameCenter.mercenaryMng.GetMercenaryById(index).Aptitude; NewPetDataRef petDataRef = ConfigMng.Instance.GetPetDataRef(id); int zzNeedExp = 0; if (petDataRef != null) { zzNeedExp = petDataRef.zZExp; } float EXP = GameCenter.mercenaryMng.GetMercenaryById(index).AptitudeExp; if (expEggSli != null) { expEggSli.value = EXP / zzNeedExp; } if (expEggLab != null) { expEggLab.text = EXP + "/" + zzNeedExp; } }
protected void SetTitle() { string str = string.Empty; List <TitleRef> honorList = GameCenter.mercenaryMng.HonorList; NewPetDataRef petData = ConfigMng.Instance.GetPetDataRef(GrowUp); if (petData != null) { int growTitle = petData.cZTitle; for (int i = 0; i < honorList.Count; i++) { if (growTitle >= honorList[i].type) { str = honorList[i].icon; } } if (str != string.Empty) { PetTitleName = str; //Debug.Log("设置宠物称号: " + PetTitleName); } } }
/// <summary> /// 刷新显示升级信息 /// </summary> void RefreshPromoteInfo() { FDictionary mercenaryInfoList = GameCenter.mercenaryMng.mercenaryInfoList; if (mercenaryInfoList.Count <= 0 || GameCenter.mercenaryMng.curPetId == MercenaryMng.noPet) { if (curNameLab != null) { curNameLab.text = string.Empty; } if (nameLab != null) { nameLab.text = string.Empty; } if (curGrowUpValLab != null) { curGrowUpValLab.text = "0"; } if (curSp != null) { curSp.gameObject.SetActive(false); } if (nextSp != null) { nextSp.gameObject.SetActive(false); } if (attValLab != null) { attValLab.text = "0"; } if (hitValLab != null) { hitValLab.text = "0"; } if (crazyHitValLab != null) { crazyHitValLab.text = "0"; } if (GrowUpAfterPromoteLab != null) { GrowUpAfterPromoteLab.text = "0"; } if (attAfterPromoteLab != null) { attAfterPromoteLab.text = "0"; } if (hitAfterPromoteLab != null) { hitAfterPromoteLab.text = "0"; } if (crazyHitAfterPromoteLab != null) { crazyHitAfterPromoteLab.text = "0"; } if (coinLab != null) { coinLab.text = "0"; } if (foodLab != null) { foodLab.text = "0"; } if (upLevelUislider != null) { upLevelUislider.value = 0; } if (upBtnRedSp != null) { upBtnRedSp.gameObject.SetActive(false); } expLab.text = 0 + "/" + 0; for (int i = 0, max = petHonorList.Count; i < max; i++) { if (petHonorList[i] != null) { petHonorList[i].gameObject.SetActive(false); } } return; } curInfo = GameCenter.mercenaryMng.GetMercenaryById(GameCenter.mercenaryMng.curPetId); if (curInfo == null) { return; } NewPetDataRef petData = null; NewPetDataRef nextPetData = null; czid = curInfo.GrowUp; len = ConfigMng.Instance.GetPetDataRefTable.Count - 1; if (czid < len) { fullLev.gameObject.SetActive(false); promoteBtn.gameObject.SetActive(true); } else { fullLev.gameObject.SetActive(true); promoteBtn.gameObject.SetActive(false); } if (czid <= len && czid <= len) { petData = ConfigMng.Instance.GetPetDataRef(czid); } if ((czid + 1) <= len && (czid + 1) <= len) { nextPetData = ConfigMng.Instance.GetPetDataRef(czid + 1); } else { nextPetData = petData; } if (curNameLab != null) { curNameLab.text = curInfo.PetName; } if (nameLab != null) { nameLab.text = curInfo.PetName; } if (curGrowUpValLab != null) { curGrowUpValLab.text = czid.ToString(); //当前成长值 } if (curSp != null) { curSp.gameObject.SetActive(true); curSp.spriteName = curInfo.Icon; } int growTitle = 0; if (nextSp != null) { nextSp.gameObject.SetActive(true); nextSp.spriteName = curInfo.Icon; } int curatt = 0; if (czid <= 0) { attValLab.text = "0"; hitValLab.text = "0"; crazyHitValLab.text = "0"; upLevelUislider.value = 0;//当前成长经验/升级所需成长经验 if (expLab != null && nextPetData != null) { expLab.text = 0 + "/" + nextPetData.cZExp; } } else if (petData != null) { int curExp = 0; if (czid < len) { curExp = curInfo.GrowUpExp; } else { curExp = petData.cZExp; } if (upLevelUislider != null && nextPetData != null) { upLevelUislider.value = (float)curExp / nextPetData.cZExp; //当前成长经验/升级所需成长经验 } if (expLab != null) { expLab.text = curExp + "/" + nextPetData.cZExp; } if (petData != null) { growTitle = petData.cZTitle; } for (int j = 0; j < petData.chengZhang.Count; j++) { if (petData.chengZhang[j].eid == (int)PetProperty.PETATT) { curatt = petData.chengZhang[j].count; if (attValLab != null) { attValLab.text = curatt.ToString(); } } if (petData.chengZhang[j].eid == (int)PetProperty.PETHIT) { if (hitValLab != null) { hitValLab.text = petData.chengZhang[j].count.ToString(); } } if (petData.chengZhang[j].eid == (int)PetProperty.PETCRI) { if (crazyHitValLab != null) { crazyHitValLab.text = petData.chengZhang[j].count.ToString(); } } } } if (GrowUpAfterPromoteLab != null) { if (czid < (ConfigMng.Instance.GetPetDataRefTable.Count - 1)) { GrowUpAfterPromoteLab.text = (curInfo.GrowUp + 1).ToString();//提升后的成长值 } else { GrowUpAfterPromoteLab.text = curInfo.GrowUp.ToString(); } } int att = 0; int hit = 0; int cri = 0; if (nextPetData != null) { growItem = nextPetData.cZIem; for (int i = 0; i < nextPetData.chengZhang.Count; i++) { if (nextPetData.chengZhang[i].eid == (int)PetProperty.PETATT) { att = nextPetData.chengZhang[i].count; } if (nextPetData.chengZhang[i].eid == (int)PetProperty.PETHIT) { hit = nextPetData.chengZhang[i].count; } if (nextPetData.chengZhang[i].eid == (int)PetProperty.PETCRI) { cri = nextPetData.chengZhang[i].count; } } } if (attAfterPromoteLab != null) { attAfterPromoteLab.text = (att).ToString(); //提升后的攻击 } if (hitAfterPromoteLab != null) { hitAfterPromoteLab.text = (hit).ToString(); //提升后的命中 } if (crazyHitAfterPromoteLab != null) { crazyHitAfterPromoteLab.text = (cri).ToString(); //提升后的暴击 } bool isItemEnough = false; bool isCoinEnough = false; if (growItem.Count > 0 && MainPlayerInfo != null) { for (int i = 0; i < growItem.Count; i++) { if (growItem[i].eid == 5) { if (MainPlayerInfo.TotalCoinCount < (ulong)growItem[i].count) { coinLab.text = growItem[i].count + "/" + "[ff0000]" + MainPlayerInfo.TotalCoinCount; } else { coinLab.text = growItem[i].count + "/" + "[6ef574]" + MainPlayerInfo.TotalCoinCount;//需要的金币/拥有的 isCoinEnough = true; } } else { itemId = growItem[i].eid; itemRef = ConfigMng.Instance.GetEquipmentRef(itemId); if (GameCenter.inventoryMng.GetNumberByType(growItem[i].eid) >= growItem[i].count) { isItemEnough = true; if (foodLab != null) { foodLab.text = growItem[i].count + "/" + "[6ef574]" + GameCenter.inventoryMng.GetNumberByType(growItem[i].eid); } } else { if (foodLab != null) { foodLab.text = growItem[i].count + "/" + "[ff0000]" + GameCenter.inventoryMng.GetNumberByType(growItem[i].eid); } } } } } if (!isItemEnough) { if (diamondLab != null && MainPlayerInfo != null && itemRef != null) { diamondLab.text = itemRef.diamonPrice + "/" + MainPlayerInfo.TotalDiamondCount.ToString(); } } else { if (diamondLab != null && MainPlayerInfo != null) { diamondLab.text = "0/" + MainPlayerInfo.TotalDiamondCount.ToString(); } } if (isItemEnough && isCoinEnough && czid < (ConfigMng.Instance.GetPetDataRefTable.Count - 1)) { upBtnRedSp.gameObject.SetActive(true); } else { upBtnRedSp.gameObject.SetActive(false); } ShowHonor(growTitle); }
/// <summary> /// 刷新界面宠物信息 /// </summary> public void RefreshPetInfoWnd() { NoStar(mingHunStarList); NoStar(tianHunStarList); NoStar(diHunStarList); if (GameCenter.mercenaryMng.curPetId == MercenaryMng.noPet) { ShowNoPet(); return; } curInfo = GameCenter.mercenaryMng.GetMercenaryById(GameCenter.mercenaryMng.curPetId); if (curInfo == null) { ShowNoPet(); return; } if (ziZhiLab != null) { ziZhiLab.text = curInfo.Aptitude.ToString(); } if (levelLabe != null) { levelLabe.text = curInfo.Level.ToString(); } if (growUpLabel != null) { growUpLabel.text = curInfo.GrowUp.ToString(); } if (petTex != null) { GameCenter.previewManager.TryPreviewSingelEntourage(curInfo, petTex); } if (petNameInput != null) { petNameInput.value = curInfo.NoColorName; } //属性、成长、精魂数值 if (propertyInfoVal.Length >= 9) { for (int j = 0; j < curInfo.PropertyList.Count; j++) { if (curInfo.PropertyList[j].type == 1) { propertyInfoVal[0].text = curInfo.PropertyList[j].num.ToString(); } if (curInfo.PropertyList[j].type == 7) { propertyInfoVal[1].text = curInfo.PropertyList[j].num.ToString(); } if (curInfo.PropertyList[j].type == 9) { propertyInfoVal[2].text = curInfo.PropertyList[j].num.ToString(); } } NewPetDataRef petData = ConfigMng.Instance.GetPetDataRef(curInfo.GrowUp); if (petData != null) { for (int j = 0; j < petData.chengZhang.Count; j++) { if (petData.chengZhang[j].eid == 1) { propertyInfoVal[3].text = petData.chengZhang[j].count.ToString(); } if (petData.chengZhang[j].eid == 7) { propertyInfoVal[4].text = petData.chengZhang[j].count.ToString(); } if (petData.chengZhang[j].eid == 9) { propertyInfoVal[5].text = petData.chengZhang[j].count.ToString(); } } } if (curInfo.GrowUp <= 0) { propertyInfoVal[3].text = "0"; propertyInfoVal[4].text = "0"; propertyInfoVal[5].text = "0"; } for (int j = 0; j < curInfo.SoulPropertyList.Count; j++) { if (curInfo.SoulPropertyList[j].type == 1) { propertyInfoVal[6].text = curInfo.SoulPropertyList[j].num.ToString(); } if (curInfo.SoulPropertyList[j].type == 7) { propertyInfoVal[7].text = curInfo.SoulPropertyList[j].num.ToString(); } if (curInfo.SoulPropertyList[j].type == 9) { propertyInfoVal[8].text = curInfo.SoulPropertyList[j].num.ToString(); } } } ShowStar(tianHunStarList, curInfo.Tian_soul); ShowStar(diHunStarList, curInfo.Di_soul); ShowStar(mingHunStarList, curInfo.Life_soul); ShowSkill(); //出战状态(出战、休息两状态切换) if (curInfo.IsActive == 1) { if (fightBtn != null) { fightBtn.gameObject.SetActive(false); } if (restBtn != null) { restBtn.gameObject.SetActive(true); } } else { if (fightBtn != null) { fightBtn.gameObject.SetActive(true); } if (restBtn != null) { restBtn.gameObject.SetActive(false); } } }
/// <summary> /// 刷新 /// </summary> void Refresh() { FDictionary mercenaryInfoList = GameCenter.mercenaryMng.mercenaryInfoList; if (mercenaryInfoList.Count <= 0) { if (aptitudeLab != null) { aptitudeLab.text = "0"; } if (propertyAptitude != null) { propertyAptitude.text = ConfigMng.Instance.GetUItext(33, new string[2] { "0", "0" }); } if (petAttLab != null) { petAttLab.text = "0"; } if (playerAttLab != null) { playerAttLab.text = "0"; } if (petHitLab != null) { petHitLab.text = "0"; } if (playerHitLab != null) { playerHitLab.text = "0"; } if (petCrazyHitLab != null) { petCrazyHitLab.text = "0"; } if (playerCrazyHitLab != null) { playerCrazyHitLab.text = "0"; } if (nameLab != null) { nameLab.text = null; } if (petTex != null) { petTex.mainTexture = null; } for (int i = 0, max = petBDSkillList.Count; i < max; i++) { petBDSkillList[i].gameObject.SetActive(false); } return; } if (GameCenter.mercenaryMng.curPetId != MercenaryMng.noPet) { float propr = 0; curInfo = GameCenter.mercenaryMng.GetMercenaryById(GameCenter.mercenaryMng.curPetId); if (curInfo != null) { ShowSkill(); if (aptitudeLab != null) { aptitudeLab.text = curInfo.Aptitude.ToString(); } NewPetDataRef petDataRef = ConfigMng.Instance.GetPetDataRef(curInfo.Aptitude); if (petDataRef != null) { if (propertyAptitude != null) { propertyAptitude.text = ConfigMng.Instance.GetUItext(33, new string[2] { (((float)petDataRef.zhiZi) / 10000 * 100).ToString(), skillProperty.ToString() }); } } propr = ((float)petDataRef.zhiZi) / 10000 * 100 + skillProperty; int attr = 0; for (int j = 0; j < curInfo.PropertyList.Count; j++) { if (curInfo.PropertyList[j].type == 1 || curInfo.PropertyList[j].type == 2) { attr = curInfo.PropertyList[j].num; if (petAttLab != null) { petAttLab.text = attr.ToString(); } if (playerAttLab != null) { playerAttLab.text = ((int)(attr * propr) / 100).ToString(); } } if (curInfo.PropertyList[j].type == 7) { if (petHitLab != null) { petHitLab.text = curInfo.PropertyList[j].num.ToString(); } if (playerHitLab != null) { playerHitLab.text = ((int)(curInfo.PropertyList[j].num * propr) / 100).ToString(); } } if (curInfo.PropertyList[j].type == 9) { if (petCrazyHitLab != null) { petCrazyHitLab.text = curInfo.PropertyList[j].num.ToString(); } if (playerCrazyHitLab != null) { playerCrazyHitLab.text = ((int)(curInfo.PropertyList[j].num * propr) / 100).ToString(); } } } if (nameLab != null) { nameLab.text = curInfo.PetName; } if (petTex != null) { GameCenter.previewManager.TryPreviewSingelEntourage(curInfo, petTex); } if (curInfo.IsActive == 2)//守护 { if (cancelGuardBtn != null) { cancelGuardBtn.gameObject.SetActive(true); } if (guardBtn != null) { guardBtn.gameObject.SetActive(false); } } else//没有状态 { if (cancelGuardBtn != null) { cancelGuardBtn.gameObject.SetActive(false); } if (guardBtn != null) { guardBtn.gameObject.SetActive(true); } } } } }
/// <summary> /// 刷新界面 /// </summary> void RefreshXiuLingInfo() { FDictionary mercenaryInfoList = GameCenter.mercenaryMng.mercenaryInfoList; if (mercenaryInfoList.Count <= 0) { if (AttLabAfterTrainTH != null) { AttLabAfterTrainTH.text = "0"; } tianRedRemind.gameObject.SetActive(false); tianfullLev.gameObject.SetActive(false); tianHunTrainBtn.gameObject.SetActive(false); if (expSp.Count > 2 && expRatio.Length > 2) { expSp[0].fillAmount = 0; expRatio[0].text = "0"; expSp[1].fillAmount = 0; expRatio[1].text = "0"; expSp[2].fillAmount = 0; expRatio[2].text = "0"; } if (HitLabAfterTrainDH != null) { HitLabAfterTrainDH.text = "0"; } if (CrazyHitLabAfterTrainMH != null) { CrazyHitLabAfterTrainMH.text = "0"; } if (coinLab != null) { coinLab.text = "0"; } if (lxPillLab != null) { lxPillLab.text = "0"; } NoStar(mingHunStarList); NoStar(tianHunStarList); NoStar(diHunStarList); return; } if (curInfo == null || (curInfo != null && curInfo.ConfigId != GameCenter.mercenaryMng.curPetId)) { curInfo = GameCenter.mercenaryMng.GetMercenaryById(GameCenter.mercenaryMng.curPetId); } if (curInfo != null) { ShowStar(tianHunStarList, curInfo.Tian_soul); ShowStar(diHunStarList, curInfo.Di_soul); ShowStar(mingHunStarList, curInfo.Life_soul); NewPetDataRef tHPetData = ConfigMng.Instance.GetPetDataRef(curInfo.Tian_soul > 0 ? curInfo.Tian_soul + 1 : 1); NewPetDataRef dHPetData = ConfigMng.Instance.GetPetDataRef(curInfo.Di_soul > 0 ? curInfo.Di_soul + 1 : 1); NewPetDataRef lifePetData = ConfigMng.Instance.GetPetDataRef(curInfo.Life_soul > 0 ? curInfo.Life_soul + 1 : 1); if (curInfo.Tian_soul <= 0) { NoStar(tianHunStarList); } if (curInfo.Di_soul <= 0) { NoStar(diHunStarList); } if (curInfo.Life_soul <= 0) { NoStar(mingHunStarList); } bool isCoinEnough = false; bool isItemEnough = false; if (curInfo.LxItem.Count > 0) { for (int i = 0; i < curInfo.LxItem.Count; i++) { if (curInfo.LxItem[i].eid == 5) { if (MainPlayerInfo != null) { if (MainPlayerInfo.TotalCoinCount < (ulong)curInfo.LxItem[i].count) { coinLab.text = curInfo.LxItem[i].count + "/" + "[ff0000]" + MainPlayerInfo.TotalCoinCount; } else { isCoinEnough = true; coinLab.text = curInfo.LxItem[i].count + "/" + "[6ef574]" + MainPlayerInfo.TotalCoinCount; } } } else { itemId = curInfo.LxItem[i].eid; itemRef = ConfigMng.Instance.GetEquipmentRef(itemId); if (GameCenter.inventoryMng.GetNumberByType(curInfo.LxItem[i].eid) >= curInfo.LxItem[i].count) { isItemEnough = true; if (lxPillLab != null) { lxPillLab.text = curInfo.LxItem[i].count + "/" + "[6ef574]" + GameCenter.inventoryMng.GetNumberByType(curInfo.LxItem[i].eid); } } else { if (lxPillLab != null) { lxPillLab.text = curInfo.LxItem[i].count + "/" + "[ff0000]" + GameCenter.inventoryMng.GetNumberByType(curInfo.LxItem[i].eid); } } } } } if (MainPlayerInfo != null) { if (!isItemEnough) { if (itemRef != null && diamondLab != null) { diamondLab.text = itemRef.diamonPrice + "/" + MainPlayerInfo.TotalDiamondCount.ToString(); } } else { if (diamondLab != null) { diamondLab.text = "0/" + MainPlayerInfo.TotalDiamondCount.ToString(); } } } if (curInfo.Tian_soul >= 32) { tianRedRemind.gameObject.SetActive(false); tianfullLev.gameObject.SetActive(true); tianHunTrainBtn.gameObject.SetActive(false); } else { if (isCoinEnough && isItemEnough) { tianRedRemind.gameObject.SetActive(true); } else { tianRedRemind.gameObject.SetActive(false); } tianfullLev.gameObject.SetActive(false); tianHunTrainBtn.gameObject.SetActive(true); } if (curInfo.Di_soul >= 32) { diRedRemind.gameObject.SetActive(false); difullLev.gameObject.SetActive(true); diHunTrainBtn.gameObject.SetActive(false); } else { difullLev.gameObject.SetActive(false); diHunTrainBtn.gameObject.SetActive(true); if (isCoinEnough && isItemEnough) { diRedRemind.gameObject.SetActive(true); } else { diRedRemind.gameObject.SetActive(false); } } if (curInfo.Life_soul >= 32) { mingRedRemind.gameObject.SetActive(false); mingfullLev.gameObject.SetActive(true); mingHunTrainBtn.gameObject.SetActive(false); } else { mingfullLev.gameObject.SetActive(false); mingHunTrainBtn.gameObject.SetActive(true); if (isCoinEnough && isItemEnough) { mingRedRemind.gameObject.SetActive(true); } else { mingRedRemind.gameObject.SetActive(false); } } for (int j = 0, max = curInfo.SoulPropertyList.Count; j < max; j++) { if (curInfo.SoulPropertyList[j].type == (int)PetProperty.PETATT && tHPetData != null) { float attr = curInfo.SoulPropertyList[j].num; float needVal = 0; if (tHPetData.lXExp.Count > 0 && curInfo.Tian_soul < 32) { needVal = tHPetData.lXExp[0]; } else { needVal = attr; } float posy = -128; if (needVal != 0) { posy = -128 + (attr / needVal) * 136; } if (AttLabAfterTrainTH != null) { AttLabAfterTrainTH.text = (attr).ToString(); } if (expSp.Count > 0) { expSp[0].transform.localPosition = new Vector3 (expSp[0].transform.localPosition.x, posy, 0); } if (expRatio.Length > 0) { expRatio[0].text = attr + "/" + needVal; } } if (curInfo.SoulPropertyList[j].type == (int)PetProperty.PETHIT && dHPetData != null) { float val = curInfo.SoulPropertyList[j].num; float needVal = 0; if (dHPetData.lXExp.Count > 1 && curInfo.Di_soul < 32) { needVal = dHPetData.lXExp[1]; } else { needVal = val; } float posy = -128; if (needVal != 0) { posy = -128 + (val / needVal) * 136; } if (HitLabAfterTrainDH != null) { HitLabAfterTrainDH.text = val.ToString(); } if (expSp.Count > 1) { expSp[1].transform.localPosition = new Vector3 (expSp[1].transform.localPosition.x, posy, 0); } if (expRatio.Length > 1) { expRatio[1].text = val + "/" + needVal; } } if (curInfo.SoulPropertyList[j].type == (int)PetProperty.PETCRI && lifePetData != null) { float val = curInfo.SoulPropertyList[j].num; float needVal = 0; if (lifePetData.lXExp.Count > 2 && curInfo.Life_soul < 32) { needVal = lifePetData.lXExp[2]; } else { needVal = val; } float posy = -128; if (needVal != 0) { posy = -128 + (val / needVal) * 136; } if (CrazyHitLabAfterTrainMH != null) { CrazyHitLabAfterTrainMH.text = val.ToString(); } if (expSp.Count > 2) { expSp[2].transform.localPosition = new Vector3 (expSp[2].transform.localPosition.x, posy, 0); } if (expRatio.Length > 2) { expRatio[2].text = val + "/" + needVal; } } } } }
void UpdataZhuInfo() { if (GameCenter.mercenaryMng.fuPetId != MercenaryMng.noPet) { if (mixEx != null) { mixEx.IsGray = UISpriteEx.ColorGray.normal; } } zhuInfo = GameCenter.mercenaryMng.GetMercenaryById(GameCenter.mercenaryMng.zhuPetId); if (zhuInfo == null) { return; } fullZhuApitude.gameObject.SetActive(false); zhuUpZizhiBtn.gameObject.SetActive(true); zhuUseEgg.gameObject.SetActive(true); if (zhuInfo != null && zhuInfo.Aptitude >= 100) { fullZhuApitude.gameObject.SetActive(true); zhuUpZizhiBtn.gameObject.SetActive(false); zhuUseEgg.gameObject.SetActive(false); } NewPetDataRef petDataRef = ConfigMng.Instance.GetPetDataRef(zhuInfo.Aptitude > 0 ? zhuInfo.Aptitude : 1); int zzNeedExp = 0; if (petDataRef != null && zhuInfo.Aptitude < 100) { zzNeedExp = petDataRef.zZExp; } else { zzNeedExp = zhuInfo.AptitudeExp; } if (zhuInfo != null) { if (expUislider != null) { expUislider.value = (float)zhuInfo.AptitudeExp / zzNeedExp; } if (ziZhiExp != null) { ziZhiExp.text = zhuInfo.AptitudeExp + "/" + zzNeedExp; } if (zhuNameLab != null) { zhuNameLab.text = zhuInfo.PetName; } if (zhuChengzhangLab != null) { zhuChengzhangLab.text = zhuInfo.GrowUp.ToString(); //成长 } if (zhuZizhiLab != null) { zhuZizhiLab.text = zhuInfo.Aptitude.ToString(); //资质 } for (int j = 0; j < zhuInfo.SoulPropertyList.Count; j++) { if (zhuInfo.SoulPropertyList[j].type == (int)PetProperty.PETATT) { if (zhuAttLab != null) { zhuAttLab.text = zhuInfo.SoulPropertyList[j].num.ToString(); } } if (zhuInfo.SoulPropertyList[j].type == (int)PetProperty.PETHIT) { if (zhuHitLab != null) { zhuHitLab.text = zhuInfo.SoulPropertyList[j].num.ToString(); } } if (zhuInfo.SoulPropertyList[j].type == (int)PetProperty.PETCRI) { if (zhuCrazyHitLab != null) { zhuCrazyHitLab.text = zhuInfo.SoulPropertyList[j].num.ToString(); } } } if (zhuHeadSp != null) { zhuHeadSp.spriteName = zhuInfo.Icon; } } if (promoteApititudeUi != null && promoteApititudeUi.activeSelf) { ShowZiZhiPillInfo(GameCenter.mercenaryMng.zhuPetId); } }
/// <summary> /// 资质丹窗口的显示 /// </summary> void ShowZiZhiPillInfo(int _id) { int id = GameCenter.mercenaryMng.GetMercenaryById(_id).Aptitude; if (id >= 100) { if (promoteApititudeUi.gameObject.activeSelf) { promoteApititudeUi.gameObject.SetActive(false); } } else { if (!promoteApititudeUi.gameObject.activeSelf) { promoteApititudeUi.gameObject.SetActive(true); } } //经验条的显示 NewPetDataRef petDataRef = ConfigMng.Instance.GetPetDataRef(id); int zzNeedExp = 0; if (petDataRef != null) { zzNeedExp = petDataRef.zZExp; zZItem = petDataRef.zZItem; } int EXP = GameCenter.mercenaryMng.GetMercenaryById(_id).AptitudeExp; if (expSli != null) { expSli.value = (float)EXP / zzNeedExp; } if (expLab != null) { expLab.text = EXP + "/" + zzNeedExp; } if (diamondLab != null && MainPlayerInfo != null) { diamondLab.text = MainPlayerInfo.DiamondCountText; } if (zZItem.Count > 0) { for (int i = 0; i < zZItem.Count; i++) { if (zZItem[i].eid == 2200006) { if (pillCountLab.Count > 0) { pillCountLab[0].text = zZItem[i].count + "/" + GameCenter.inventoryMng.GetNumberByType(2200006); } if (pillItem.Count > 0) { pillItem[0].FillInfo(new EquipmentInfo(zZItem[i].eid, EquipmentBelongTo.PREVIEW)); } } if (zZItem[i].eid == 2200007) { if (pillCountLab.Count > 1) { pillCountLab[1].text = zZItem[i].count + "/" + GameCenter.inventoryMng.GetNumberByType(2200007); } if (pillItem.Count > 1) { pillItem[1].FillInfo(new EquipmentInfo(zZItem[i].eid, EquipmentBelongTo.PREVIEW)); } } if (zZItem[i].eid == 2200008) { if (pillCountLab.Count > 2) { pillCountLab[2].text = zZItem[i].count + "/" + GameCenter.inventoryMng.GetNumberByType(2200008); } if (pillItem.Count > 2) { pillItem[2].FillInfo(new EquipmentInfo(zZItem[i].eid, EquipmentBelongTo.PREVIEW)); } } } } }