| | |
| | | [SerializeField] Button heroPackBtn; |
| | | [SerializeField] Text heroPackText; |
| | | [SerializeField] ScrollerController heroListScroller; |
| | | [SerializeField] List<Text> totalAttrList; |
| | | // [SerializeField] List<Text> totalAttrList; |
| | | [SerializeField] Button attrBtn; |
| | | [SerializeField] HeroSelectBehaviour fiterManager; //武将筛选 |
| | | [SerializeField] Transform heroSelectBehaviour; |
| | | HeroSelectBehaviour fiterManager; //武将筛选 |
| | | |
| | | SinglePack singlePack; |
| | | |
| | |
| | | { |
| | | HeroUIManager.Instance.QueryUnLockHeroPack(); |
| | | }); |
| | | |
| | | fiterManager = HeroSelectBehaviour.Create(heroSelectBehaviour); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | PackManager.Instance.RefreshItemEvent += RefreshItemEvent; |
| | | HeroUIManager.Instance.OnHeroCollectEvent += OnHeroCollectEvent; |
| | | heroListScroller.OnRefreshCell += OnRefreshCell; |
| | | HeroUIManager.Instance.selectHeroCollectListJob = 0; |
| | | HeroUIManager.Instance.selectHeroCollectListCountry = 0; |
| | | HeroUIManager.Instance.SortHeroCollectList(); |
| | | Display(); |
| | | } |
| | |
| | | |
| | | void Display() |
| | | { |
| | | fiterManager.Display(0, HeroUIManager.Instance.selectHeroCollectListJob, HeroUIManager.Instance.selectHeroCollectListCountry, SelectJobCountry); |
| | | fiterManager.Display(0, SelectJobCountry); |
| | | |
| | | CreateScroller(); |
| | | RefreshTotalAttr(); |
| | | // CreateScroller(); |
| | | // RefreshTotalAttr(); |
| | | RefreshPackCount(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | void RefreshTotalAttr() |
| | | { |
| | | for (int i = 0; i < totalAttrList.Count; i++) |
| | | { |
| | | totalAttrList[i].text = PlayerPropertyConfig.GetFullDescription(PlayerPropertyConfig.basePerAttrs[i], |
| | | HeroUIManager.Instance.allHeroBookPer); |
| | | } |
| | | } |
| | | // void RefreshTotalAttr() |
| | | // { |
| | | // for (int i = 0; i < totalAttrList.Count; i++) |
| | | // { |
| | | // totalAttrList[i].text = PlayerPropertyConfig.GetFullDescription(PlayerPropertyConfig.basePerAttrs[i], |
| | | // HeroUIManager.Instance.allHeroBookPer); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | void SelectJobCountry(int job, int country) |
| | | /// 回调参数: 职业,国家,伤害类型,6大战斗属性,特殊属性 |
| | | void SelectJobCountry(List<int> selects) |
| | | { |
| | | HeroUIManager.Instance.selectHeroCollectListJob = job; |
| | | HeroUIManager.Instance.selectHeroCollectListCountry = country; |
| | | HeroUIManager.Instance.selectHeroCollectList = selects; |
| | | HeroUIManager.Instance.SortHeroCollectList(); |
| | | CreateScroller(); |
| | | } |
| | |
| | | |
| | | void OnHeroCollectEvent() |
| | | { |
| | | RefreshTotalAttr(); |
| | | // RefreshTotalAttr(); |
| | | heroListScroller.m_Scorller.RefreshActiveCellViews(); |
| | | } |
| | | |