/// <summary> /// 更新星魂信息 /// </summary> public void updateStarSoul() { levelValueLabel.text = starSoul.getLevel() + "/" + starSoul.getMaxLevel(); starSoulNameLabel.text = QualityManagerment.getQualityColor(starSoul.getQualityId()) + starSoul.getName(); long currentLvExp = EXPSampleManager.Instance.getNowEXPShow(starSoul.getEXPSid(), starSoul.getEXP()); long currentLvMaxEXP = EXPSampleManager.Instance.getMaxEXPShow(starSoul.getEXPSid(), starSoul.getEXP()); if (starSoul.isMaxLevel()) { expBar.updateValue(currentLvMaxEXP, currentLvMaxEXP); } else { expBar.updateValue(currentLvExp, currentLvMaxEXP); } expLabel.text = EXPSampleManager.Instance.getExpBarShow(starSoul.getEXPSid(), starSoul.getEXP()); if (starSoul.checkState(EquipStateType.LOCKED)) { lockSprite.gameObject.SetActive(true); } else { lockSprite.gameObject.SetActive(false); } ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.STARSOUL_ICONPREFAB_PATH + starSoul.getIconId(), starSoulViewPoint.transform, (obj) => { GameObject gameObj = obj as GameObject; if (gameObj != null) { Transform childTrans = gameObj.transform; if (childTrans != null) { StarSoulEffectCtrl effectCtrl = childTrans.gameObject.GetComponent <StarSoulEffectCtrl>(); effectCtrl.setColor(starSoul.getQualityId()); } } }); string[] str = starSoul.getDescribe().Split('#'); if (str.Length > 1) { attrDescLabel.text = "[A65644]" + str[0].Replace("+", "[3A9663]+"); attrDescLabel1.text = "[A65644]" + str[1].Replace("+", "[3A9663]+"); } else { attrDescLabel1.text = "[A65644]" + str[0].Replace("+", "[3A9663]+"); } int partNum = 0; if (currentCard != null) { partNum = currentCard.getStarSoulsPartNum(starSoul.partId); } // 刻印暂时没有开放 // StarSoulSuitSample starSoulSuitSample=starSoul.getStarSoulSuitSample (); // int needNum = starSoulSuitSample.parts.Length; // if (partNum>=needNum) { // // 策划文档上还有个龙之刻印:2分是什么东西??? // suitDescLabel.text = "[FFFFFF]"+starSoulSuitSample.name+": "+starSoulSuitSample.desc; // } else { // suitDescLabel.text = "[999999]"+starSoulSuitSample.name+"("+LanguageConfigManager.Instance.getLanguage("StarSoulWindow_Suit_NotAcitve")+"): "+starSoulSuitSample.desc+"("+ // LanguageConfigManager.Instance.getLanguage("StarSoulWindow_Suit_Acitve_Desc",needNum.ToString())+")"; // } }
/// <summary> /// 初始化 /// </summary> /// <param name="wb"></param> /// <param name="ss"></param> public void init(WindowBase wb, StarSoul ss, Card card, int flag, int currentStarBroe) { currentcard = card; showTypeNum = flag; starSoul = ss; clickButton.fatherWindow = wb; flagChange = 12; this.currentStarBroeIndex = currentStarBroe; if (ss == null) { eqName.text = LanguageConfigManager.Instance.getLanguage("resonanceWindow02"); //eqbg.gameObject.SetActive(false); lvBar.updateValue(0, 1); eqlLabel.text = ""; clickButton.disableButton(true); partt.gameObject.SetActive(true); if (!StarSoulManager.Instance.checkBroeOpenLev(currentcard, currentStarBroeIndex + 1) && showTypeNum != CardBookWindow.CLICKCHATSHOW) { lvOpen.gameObject.SetActive(false); lvClose.gameObject.SetActive(true); unOpenLabel.gameObject.SetActive(true); unOpenLabel.text = LanguageConfigManager.Instance.getLanguage("warchoose04", StarSoulConfigManager.Instance.getGrooveOpen()[currentStarBroeIndex].ToString()); } if (showTypeNum == CardBookWindow.CLICKCHATSHOW) { lvOpen.gameObject.SetActive(true); lvClose.gameObject.SetActive(false); unOpenLabel.gameObject.SetActive(false); clickButton.disableButton(true); this.transform.FindChild("button").gameObject.GetComponent <Collider>().enabled = false; } else { clickButton.onClickEvent = noStarSoulClick; } } else { eqName.text = starSoul.getName(); //eqbg.gameObject.SetActive(true); partt.gameObject.SetActive(false); lvBar.updateValue(starSoul.getLevel(), starSoul.getMaxLevel()); eqlLabel.text = starSoul.getLevel() + "/" + starSoul.getMaxLevel(); clickButton.disableButton(true); lvOpen.gameObject.SetActive(false); GameObject obj; if (viewPoint.transform.childCount > 0) { obj = viewPoint.transform.GetChild(0).gameObject; } else { obj = NGUITools.AddChild(viewPoint, viewPerfabe); } GoodsView gv = obj.GetComponent <GoodsView>(); gv.setFatherWindow(clickButton.fatherWindow); //gv.onClickCallback = grooveButtonClickHanderr;//点击出问题 gv.init(starSoul, GoodsView.BOTTOM_TEXT_NAME_LV); gv.transform.FindChild("rightBottomText").gameObject.SetActive(false); gv.transform.localScale = new Vector3(0.8f, 0.8f, 1); //this.transform.FindChild("button").gameObject.GetComponent<Collider>().enabled = false; if (showTypeNum == CardBookWindow.CLICKCHATSHOW) { clickButton.disableButton(true); this.transform.FindChild("button").gameObject.GetComponent <Collider>().enabled = false; } else { clickButton.onClickEvent = grooveButtonClickHanderr; } } }