/// <summary> /// 更新UI /// </summary> public void updateUI(BloodPointSample bps) { cardIcon.gameObject.SetActive(true); cardIconForMaxQuality.gameObject.SetActive(false); cardIconForMaxQuality.mainTexture = null; updateAttrs(); //更新卡片基础信息 updateChangeAttrs(bps); //更新即将加成的属性数值(如果是技能类那么不需要显示) int[] tempQuliq = BloodConfigManager.Instance.getMapQualiy(choosedCard.sid, choosedCard.cardBloodLevel); //当前血脉最高描述 describe.text = ""; if (choosedCard.cardBloodLevel < BloodConfigManager.Instance.getTotalItemNum(choosedCard.sid) && choosedCard.getQualityId() != QualityType.MYTH) //激活每一阶的最后一个节点一定会提升品质才可以这样判断 { if (tempQuliq[0] == -1) { describe.text = ""; } else { describe.text = LanguageConfigManager.Instance.getLanguage("prefabzc34", QualityManagerment.getQualityColorForBloodItem(tempQuliq[0], tempQuliq[1]), QualityManagerment.getdecForBloodItem(tempQuliq[0]), QualityManagerment.getColorForBloodItem(tempQuliq[0] - 1), QualityManagerment.getColorForBloodItem(tempQuliq[0])); } } if (choosedCard.cardBloodLevel == BloodConfigManager.Instance.getTotalItemNum(choosedCard.sid) && choosedCard.getQualityId() == QualityType.MYTH) //激活每一阶的最后一个节点一定会提升品质才可以这样判断 { cardIcon.gameObject.SetActive(false); cardIcon.mainTexture = null; ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + choosedCard.getImageID(), cardIconForMaxQuality); cardIconForMaxQuality.gameObject.SetActive(true); } int[] colorQuliq = BloodConfigManager.Instance.getCurrentBloodLvColor(choosedCard.sid, choosedCard.cardBloodLevel); //当前节点的附加属性 if (choosedCard.cardBloodLevel == BloodConfigManager.Instance.getTotalItemNum(choosedCard.sid) && choosedCard.getQualityId() == QualityType.MYTH) { bloodLevel.text = "[FF0000]" + LanguageConfigManager.Instance.getLanguage("prefabzc31", (BloodConfigManager.Instance.getCurrentBloodMap(choosedCard.sid, choosedCard.cardBloodLevel).Length + ""));//bloodLavel UIlaber描述 } else { bloodLevel.text = QualityManagerment.getQualityColorForlv(colorQuliq[0], colorQuliq[1]);//bloodLavel UIlaber描述 } }
void updateCurrentPoint() { bloodEffect[] effects = bloodItemSample.effects; string decString = ""; for (int i = 0; i < effects.Length; i++) { decString += effects[i].dec; } if (pointType == 1) { int currentIndex = BloodConfigManager.Instance.getCurrentBloodMapIndex(chooseCard.sid, chooseCard.cardBloodLevel); int mapLength = BloodConfigManager.Instance.getCurrentBloodMap(chooseCard.sid, chooseCard.cardBloodLevel).Length; int[] colorQuliq = BloodConfigManager.Instance.getCurrentBloodLvColor(chooseCard.sid, chooseCard.cardBloodLevel); if (currentIndex == mapLength - 1) { if (chooseCard.getQualityId() != QualityType.MYTH) { decString += "\n" + LanguageConfigManager.Instance.getLanguage("bloodItemDec6", QualityManagerment.getQualityColorForlv(colorQuliq[0] + 1)); } } canOpenPoint.SetActive(true); openPoint.SetActive(false); canOpenAttr.text = decString; string needDec = ""; PrizeSample[] ps = bloodItemSample.condition; for (int j = 0; j < ps.Length; j++) { if (StringKit.toInt(ps[j].num) > ps[j].getPrizeHadNum()) { needDec += "[FF0000]" + ps[j].getPrizeName() + "*" + ps[j].num + "[-]"; } else { needDec += ps[j].getPrizeName() + "*" + ps[j].num; } if (j < ps.Length - 1) { needDec += "\n"; } } string evoDec = ""; if (bloodItemSample.evoLvCondition != 0) { evoDec = LanguageConfigManager.Instance.getLanguage("bloodEvo", bloodItemSample.evoLvCondition + ""); } if (bloodItemSample.evoLvCondition > chooseCard.getEvoLevel()) //进化等级不够(只显示进化等级这个条件) { canOpenNeed.text = "[FF0000]" + evoDec; return; } canOpenNeed.text = needDec;//进化等级够了(只显示资源消耗这个条件) return; } canOpenPoint.SetActive(false); openAttrLabel.text = decString; openlvLabel.text = QualityManagerment.getQualityColorForBloodItem(colorr, index + 1); openPoint.SetActive(false); }