///index 0-2 player 3-5 Enemy
    public void SetRankText(int index, Team team)
    {
        BattleTools.SetRankText(ranks[index], team, (Rank, Team) => { RegistTeamButton(Rank, Team); });
        // Rank rank = ranks[index];

        // rank.Hero_1_Text.text = "";
        // rank.Hero_2_Text.text = "";
        // rank.Army_Text_0.text = "";
        // rank.Army_Text_1.text = "";

        // if (team != null)
        // {
        //     if (team.MainHero != null) rank.Hero_1_Text.text = team.MainHero.Name;
        //     if (team.MinorHero != null) rank.Hero_2_Text.text = team.MinorHero.Name;
        //     TeamSummaryData dic = team.GetSummary();
        //     if (dic.Maxhp == 0) return;
        //     string str;
        //     str = string.Format("Hp:{0}/{1}\n攻击:{2}\n人数:{3}", dic.Hp, dic.Maxhp, dic.Ad, dic.Count);
        //     rank.Army_Text_0.text = str;
        //     str = string.Format("士气:{0}\n防御:{1}\n受伤:{2}", dic.Morale, dic.Ed, dic.Injury);
        //     rank.Army_Text_1.text = str;
        //     RegistTeamButton(rank, team);
        // }

        teams[index] = team;
    }
 public void UpdataRanksText()
 {
     BattleTools.SetRankText(Ranks[0], Player.army.team[0], (Rank, Team) => { });
     BattleTools.SetRankText(Ranks[1], Player.army.team[1], (Rank, Team) => { });
     BattleTools.SetRankText(Ranks[2], Player.army.team[2], (Rank, Team) => { });
 }