| | |
| | | PackManager.Instance.RefreshItemLockEvent += RefreshItemLockEvent; |
| | | HeroManager.Instance.onHeroChangeEvent += RefreshHeroEvent; |
| | | UIManager.Instance.OnCloseWindow += OnCloseWindow; |
| | | HeroUIManager.Instance.OnTeamPosChangeEvent += TeamPosChangeEvent; |
| | | guid = HeroUIManager.Instance.selectHeroGuid; |
| | | hero = HeroManager.Instance.GetHero(guid); |
| | | unfoldState = false; |
| | |
| | | PackManager.Instance.RefreshItemLockEvent -= RefreshItemLockEvent; |
| | | HeroManager.Instance.onHeroChangeEvent -= RefreshHeroEvent; |
| | | UIManager.Instance.OnCloseWindow -= OnCloseWindow; |
| | | HeroUIManager.Instance.OnTeamPosChangeEvent -= TeamPosChangeEvent; |
| | | } |
| | | |
| | | private void OnCloseWindow(UIBase closeUI) |
| | |
| | | |
| | | list.Sort(); |
| | | |
| | | string allAttrStr = string.Empty; |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | var nextQualityBreakConfig = HeroBreakConfig.GetHeroBreakConfig(hero.heroId, i + 1); |
| | |
| | | var skill = SkillConfig.Get(nextQualityBreakConfig.SkillID); |
| | | if (skill != null) |
| | | { |
| | | attrStrArr.Add(skill.Description); |
| | | attrStrArr.Add(Language.Get("equipQualityFormat", skill.SkillName) + skill.Description); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | //置灰 |
| | | nameText.text = UIHelper.AppendColor(TextColType.NavyGray, Language.Get("herocard63", i + 1)); |
| | | descText.text = UIHelper.AppendColor(TextColType.NavyGray, string.Join(Language.Get("L1112"), attrStrArr)); |
| | | descText.text = UIHelper.AppendColor(TextColType.NavyGray, UIHelper.RemoveColor(string.Join(Language.Get("L1112"), attrStrArr))); |
| | | } |
| | | } |
| | | |
| | |
| | | void RefreshFetter() |
| | | { |
| | | if (hero.heroConfig.FetterIDList.Length == 0) |
| | | { |
| | | { |
| | | fetterGo.SetActive(false); |
| | | return; |
| | | } |
| | |
| | | starUPBtnText.text = Language.Get("HeroGift7"); |
| | | starUPBtn.SetInteractable(false); |
| | | } |
| | | else if (hero.IsFullStar()) |
| | | { |
| | | starUPBtnText.text = Language.Get("HeroGift3"); |
| | | starUPBtn.SetInteractable(true); |
| | | } |
| | | else |
| | | { |
| | | starUPBtnText.text = Language.Get("HeroGift3"); |
| | |
| | | |
| | | void Wash() |
| | | { |
| | | if (hero.heroStar < HeroUIManager.Instance.canWashStarLevel) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("HeroGift2", HeroUIManager.Instance.canWashStarLevel); |
| | | return; |
| | | } |
| | | |
| | | HeroUIManager.Instance.selectWashHeroGUID = hero.itemHero.guid; |
| | | UIManager.Instance.OpenWindow<HeroGiftWashWin>(); |
| | | |
| | |
| | | } |
| | | else if (type == 2) |
| | | { |
| | | awakeStr = SkillConfig.Get(config.SkillID).Description; |
| | | var skill = SkillConfig.Get(config.SkillID); |
| | | awakeStr = Language.Get("equipQualityFormat", skill.SkillName) + skill.Description; |
| | | } |
| | | else |
| | | { |
| | | for (int k = 0; k < config.AttrIDList.Length; k++) |
| | | { |
| | | awakeStr += PlayerPropertyConfig.GetFullDescription(config.AttrIDList[k], config.AttrValueList[k]) + |
| | | (k == config.AttrIDList.Length - 1 ? "" : "\n"); |
| | | awakeStr += PlayerPropertyConfig.GetFullDescription(config.AttrIDList[k], config.AttrValueList[k], "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}")) |
| | | + (k == config.AttrIDList.Length - 1 ? "" : "\n"); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | //置灰 |
| | | nameText.text = UIHelper.AppendColor(TextColType.NavyGray, Language.Get("herocard12", i) + Language.Get("L1096")); |
| | | descText.text = UIHelper.AppendColor(TextColType.NavyGray, awakeStr); |
| | | descText.text = UIHelper.AppendColor(TextColType.NavyGray, UIHelper.RemoveColor(awakeStr)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void TeamPosChangeEvent(List<int> posList, int flyFrom, Vector3 startPos) |
| | | { |
| | | fightPowerText.text = UIHelper.ReplaceLargeArtNum(hero.CalculatePower()); |
| | | } |
| | | } |