| | |
| | | public void RefreshOnTeamCountry(List<TeamHero> teamHeroes, bool playEffect = false) |
| | | { |
| | | this.teamHeroes = teamHeroes; |
| | | |
| | | // 1. 先检查混搭阵型 |
| | | var mixedConfig = HeroUIManager.Instance.GetMixedFormationConfig(teamHeroes); |
| | | if (mixedConfig != null) |
| | | { |
| | | countryOnImg.SetSprite("heroTeamCountryHe"); |
| | | var participatingCountries = HeroUIManager.Instance.GetParticipatingCountriesByPriority(teamHeroes); |
| | | int totalPoints = mixedConfig.Countrys * mixedConfig.NeedHeroCount; |
| | | for (int i = 0; i < OnCountImgs.Count; i++) |
| | | { |
| | | if (i < totalPoints) |
| | | { |
| | | int countryIndex = i / mixedConfig.NeedHeroCount; |
| | | OnCountImgs[i].SetActive(true); |
| | | OnCountImgs[i].SetSprite("heroTeamCountryPoint" + participatingCountries[countryIndex]); |
| | | } |
| | | else |
| | | { |
| | | OnCountImgs[i].SetActive(false); |
| | | } |
| | | } |
| | | if (playEffect) |
| | | countryEffect.Play(); |
| | | return; |
| | | } |
| | | |
| | | Int2 result = HeroUIManager.Instance.GetMaxCountHeroCountry(teamHeroes); |
| | | |
| | | var config = HeroLineupHaloConfig.GetConfig(result.x, result.y); |