| | |
| | | [SerializeField] HeroDebutCallButton xbButton1; |
| | | [SerializeField] HeroDebutCallButton xbButton10; |
| | | [SerializeField] TextEx resMoneyCallCntText; |
| | | [SerializeField] GradientText nextBigAwardCntText; |
| | | [SerializeField] TextEx nextBigAwardCntText; |
| | | [SerializeField] GradientText heroQualityText; |
| | | [SerializeField] GradientText heroNameText; |
| | | |
| | |
| | | [SerializeField] UIHeroController lhController; |
| | | [SerializeField] UIHeroController uiHeroController; |
| | | [SerializeField] HeroDebutCallBubbleCell[] bubbleCell; |
| | | [SerializeField] RichText richText; |
| | | |
| | | [SerializeField] float modleSize = 1f; |
| | | HeroDebutManager manager => HeroDebutManager.Instance; |
| | |
| | | PackManager.Instance.RefreshItemEvent += RefreshItemEvent; |
| | | scroller.OnRefreshCell += OnRefreshCell; |
| | | manager.OnUpdateGameRecInfo += OnUpdateGameRecInfo; |
| | | manager.OnUpdateHeroAppearPlayerInfoEvent += OnUpdateHeroAppearPlayerInfoEvent; |
| | | |
| | | if (manager.isSendFirst) |
| | | { |
| | |
| | | // 1. 在类中声明一个全局的 Sequence 变量,用于统一管控动画 |
| | | private Sequence heroAnimSeq; |
| | | |
| | | private void OnUpdateHeroAppearPlayerInfoEvent(int actNum) |
| | | private void OnUpdateHeroAppearPlayerInfoEvent() |
| | | { |
| | | changeRect.SetActive(false); |
| | | |
| | |
| | | xbTypeInfo = HappyXBModel.Instance.GetXBInfoByType(treasureType); |
| | | if (xbTypeInfo == null) return; |
| | | |
| | | bgImage.SetSprite(artConfig.MainBgImage); |
| | | bgImage.SetSprite(StringUtility.Concat("HeroDebutCallBG_", heroID.ToString())); |
| | | |
| | | lhController.Create(skinID, 1, motionName: "", isLh: true); |
| | | uiHeroController.Create(skinID, modleSize); |
| | |
| | | xbButton10.Display(config.ActTreasureType, 1); |
| | | resMoneyCallCntText.text = Language.Get("HeroDebut24", Mathf.Max(treasureSetConfig.DailyMaxCountMoney - xbTypeInfo.treasureCountTodayGold, 0)); |
| | | |
| | | var needCount = GetNextXBCountForBigAward(treasureType); |
| | | nextBigAwardCntText.text = needCount.ToString(); |
| | | int buyState = manager.GetZhanLingBuyState(); |
| | | bool isBuyPaidH = buyState == 2 || buyState == 3; |
| | | var needCount = manager.GetNextXBCountForBigAward(treasureType) - (isBuyPaidH ? manager.subVulue : 0); |
| | | nextBigAwardCntText.text = Language.Get("HeroDebut08", needCount <= 0 ? 1 : needCount); |
| | | |
| | | heroQualityText.text = Language.Get($"heroCallQaulity{heroConfig.Quality}"); |
| | | manager.SetheroQaulityColor(heroQualityText, heroConfig.Quality); |
| | |
| | | } |
| | | } |
| | | |
| | | // 购买了高级战令(玄级)时隐藏richText |
| | | richText.SetActive(!isBuyPaidH); |
| | | |
| | | ShowTop3(); |
| | | OnSecondEvent(); |
| | | } |
| | | |
| | | public int GetNextXBCountForBigAward(int type) |
| | | { |
| | | XBTypeInfo typeInfo = HappyXBModel.Instance.GetXBInfoByType(type); |
| | | if (typeInfo == null) return 0; |
| | | |
| | | var xbConfig = HappyXBModel.Instance.GetXBItemConfigByType(type); |
| | | var luckList = xbConfig.LuckyItemRateInfo.Keys.ToList(); |
| | | luckList.Sort(); |
| | | for (int i = 0; i < luckList.Count; i++) |
| | | { |
| | | var luckyValue = typeInfo.luckValue; |
| | | if (luckyValue < luckList[i]) |
| | | { |
| | | return luckList[i] - luckyValue; |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | void ShowTop3() |
| | | { |
| | | for (int i = 0; i < top3NameText.Length; i++) |
| | |
| | | scroller.Refresh(); |
| | | |
| | | int listCount = list?.Count ?? 0; |
| | | historyButton.SetActive(listCount > 0); |
| | | |
| | | if (list != null) |
| | | { |
| | | for (int i = 0; i < listCount; i++) |