lcy
10 天以前 d29421bf1c1a5a4a3db664111efe76ef446004b1
Main/System/HeroDebut/HeroDebutCallHistoryOutCell.cs
@@ -3,15 +3,19 @@
public class HeroDebutCallHistoryOutCell : HeroDebutCallHistoryCell
{
    [SerializeField] ButtonEx clickButton;
    [SerializeField] CanvasGroup canvasGroup;
    float[] alphas = new float[4] { 0.45f, 0.60f, 0.80f, 1f };
    public override void Display(int index, List<HeroDebutGameRec> list)
    {
        base.Display(index, list);
        clickButton.SetListener(() => UIManager.Instance.OpenWindow<HeroDebutCallHistoryWin>());
    }
        float alpha = alphas[index];
        canvasGroup.alpha = alpha;
    // 提供给外部设置透明度的方法
    public void SetAlpha(float alpha)
    {
        if (canvasGroup != null)
        {
            canvasGroup.alpha = alpha;
        }
    }
}