lcy
3 天以前 68869f5b4b4139958942294522471ff9f9f6c8f9
Main/System/Arena/HeroCountryComponent.cs
@@ -23,6 +23,32 @@
    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);