| | |
| | | [SerializeField] Text[] fetterNameText; //羁绊 |
| | | |
| | | |
| | | //天赋 |
| | | [SerializeField] GiftBaseCell[] giftBaseCells; |
| | | [SerializeField] Button totalGiftBtn; |
| | | [SerializeField] Button starUPBtn; |
| | | [SerializeField] Button washBtn; |
| | | |
| | | |
| | | string guid; |
| | | HeroInfo hero; |
| | | |
| | |
| | | hero = HeroManager.Instance.GetHero(guid); |
| | | unfoldState = false; |
| | | addPerObject.SetActive(false); |
| | | Refresh(); |
| | | Display(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | |
| | | } |
| | | } |
| | | } |
| | | public override void Refresh() |
| | | |
| | | public void Display() |
| | | { |
| | | roleLhModel.Create(hero.SkinID, HeroUIManager.lihuiScale, motionName: "", isLh: true); |
| | | roleXsModel.Create(hero.SkinID); |
| | |
| | | RefreshAttr(); |
| | | RefreshAllPotential(); |
| | | RefreshFetter(); |
| | | RefreshGift(); |
| | | } |
| | | |
| | | void RefreshItemLockEvent(PackType type, string guid, bool lockState) |
| | |
| | | |
| | | void RefreshHeroEvent(HeroInfo hero) |
| | | { |
| | | Refresh(); |
| | | Display(); |
| | | } |
| | | |
| | | void RefreshConn() |
| | |
| | | } |
| | | guid = HeroUIManager.Instance.heroSortList[resultIndex]; |
| | | hero = HeroManager.Instance.GetHero(guid); |
| | | Refresh(); |
| | | Display(); |
| | | } |
| | | |
| | | void ResetBtnClick() |
| | |
| | | else |
| | | { |
| | | //置灰 |
| | | allAttrStr += UIHelper.AppendColor(TextColType.Gray, Language.Get("herocard63", i + 1, string.Join(Language.Get("L1112"), attrStrArr))) + "\n"; |
| | | allAttrStr += UIHelper.AppendColor(TextColType.NavyGray, Language.Get("herocard63", i + 1, string.Join(Language.Get("L1112"), attrStrArr))) + "\n"; |
| | | } |
| | | } |
| | | |
| | |
| | | fetterText[i].SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void RefreshGift() |
| | | { |
| | | //传说以下只有4个 |
| | | int showCount = hero.Quality < 4 ? HeroUIManager.normalGiftMaxCnt : HeroUIManager.giftMaxCnt; |
| | | for (int i = 0; i < giftBaseCells.Length; i++) |
| | | { |
| | | if (i >= showCount) |
| | | { |
| | | giftBaseCells[i].SetActive(false); |
| | | continue; |
| | | } |
| | | |
| | | giftBaseCells[i].SetActive(true); |
| | | if (i < hero.talentIDList.Count) |
| | | { |
| | | int giftID = hero.talentIDList[i]; |
| | | int giftLV = hero.talentLvList[i]; |
| | | giftBaseCells[i].Init(giftID, giftLV, () => |
| | | { |
| | | var giftConfig = HeroTalentConfig.Get(giftID); |
| | | SmallTipWin.showText = Language.Get("SmallTipFomat", giftConfig.Name + " " + Language.Get("L1113", giftLV), |
| | | Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue))); |
| | | SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition); |
| | | UIManager.Instance.OpenWindow<SmallTipWin>(); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | if (i < HeroUIManager.normalGiftMaxCnt) |
| | | { |
| | | giftBaseCells[i].Init(0, 0, () => |
| | | { |
| | | SmallTipWin.showText = Language.Get("HeroGift1"); |
| | | SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition); |
| | | UIManager.Instance.OpenWindow<SmallTipWin>(); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | int index = i; |
| | | giftBaseCells[i].Init(-1, 0, () => |
| | | { |
| | | SmallTipWin.showText = Language.Get("HeroGift2", HeroAwakeConfig.GetAwakeLVByUnLockGiftIndex(hero.heroId, index)); |
| | | SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition); |
| | | UIManager.Instance.OpenWindow<SmallTipWin>(); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |