| | |
| | | { |
| | | scroller.OnRefreshCell += OnRefreshCell; |
| | | CreateScroller(); |
| | | Int2 result; |
| | | |
| | | // 优先检查混搭阵型 |
| | | HeroLineupHaloConfig activeConfig = null; |
| | | if (HeroUIManager.Instance.isCustonHeroFormation) |
| | | { |
| | | result = HeroUIManager.Instance.GetMaxCountHeroCountry(HeroUIManager.Instance.custonTeamHeroes);; |
| | | activeConfig = HeroUIManager.Instance.GetMixedFormationConfig(HeroUIManager.Instance.custonTeamHeroes); |
| | | if (activeConfig == null) |
| | | { |
| | | var result = HeroUIManager.Instance.GetMaxCountHeroCountry(HeroUIManager.Instance.custonTeamHeroes); |
| | | activeConfig = HeroLineupHaloConfig.GetConfig(result.x, result.y); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | result = HeroUIManager.Instance.GetMaxCountHeroCountry(HeroUIManager.Instance.selectTeamType, true); |
| | | activeConfig = HeroUIManager.Instance.GetMixedFormationConfig(HeroUIManager.Instance.selectTeamType, true); |
| | | if (activeConfig == null) |
| | | { |
| | | var result = HeroUIManager.Instance.GetMaxCountHeroCountry(HeroUIManager.Instance.selectTeamType, true); |
| | | activeConfig = HeroLineupHaloConfig.GetConfig(result.x, result.y); |
| | | } |
| | | } |
| | | |
| | | |
| | | var config = HeroLineupHaloConfig.GetConfig(result.x, result.y); |
| | | if (config == null) |
| | | if (activeConfig == null) |
| | | { |
| | | totalAttrText.text = ""; |
| | | } |
| | |
| | | { |
| | | string lineText = string.Empty; |
| | | |
| | | for (int i = 0; i < config.AttrIDList.Length; i++) |
| | | for (int i = 0; i < activeConfig.AttrIDList.Length; i++) |
| | | { |
| | | string format = "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}"); |
| | | lineText += " " + PlayerPropertyConfig.GetFullDescription(config.AttrIDList[i], config.AttrValueList[i], format); |
| | | lineText += " " + PlayerPropertyConfig.GetFullDescription(activeConfig.AttrIDList[i], activeConfig.AttrValueList[i], format); |
| | | } |
| | | totalAttrText.text = Language.Get("herocard36") + lineText.Trim(); |
| | | } |
| | |
| | | { |
| | | scroller.AddCell(ScrollerDataType.Header, i); |
| | | } |
| | | // 第5个为混搭阵型格子(显示在最后) |
| | | scroller.AddCell(ScrollerDataType.Header, 4); |
| | | scroller.Restart(); |
| | | } |
| | | |