1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using UnityEngine;
using UnityEngine.UI;
 
//羁绊模块
public class HeroConnectionCell : MonoBehaviour
{
    [SerializeField] HeroConnectionHeadCell[] heros;
    [SerializeField] Text connAttrText;
 
    public void Display(int fetterID)
    {
        HeroFetterConfig heroFetterConfig = HeroFetterConfig.Get(fetterID);
        for (int i = 0; i < heros.Length; i++)
        {
            if (i < heroFetterConfig.HeroIDList.Length)
            {
                heros[i].SetActive(true);
                heros[i].Display(heroFetterConfig.HeroIDList[i], i);
            }
            else
            {
                heros[i].SetActive(false);
            }
        }
        string attrStr = "";
        for (int i = 0; i < heroFetterConfig.AttrIDList.Length; i++)
        {
            attrStr += PlayerPropertyConfig.GetFullDescription(heroFetterConfig.AttrIDList[i], heroFetterConfig.AttrValueList[i]) + " ";
        }
        connAttrText.text = Language.Get("L1100", heroFetterConfig.FetterName, UIHelper.AppendColor(TextColType.lightYellow, attrStr));
    }
}