hch
2026-01-26 aa84cb62bebb9c8a4e586bcc1ec28eb7a16a8860
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
33
34
35
36
37
//--------------------------------------------------------
//    [Author]:           玩个游戏
//    [  Date ]:           Wednesday, September 26, 2018
//--------------------------------------------------------
using System;
using UnityEngine;
using UnityEngine.UI;
 
public class GuildBossAwardLineCell : CellView
{
    [SerializeField] GuildBossAwardCell[] cells;
 
    public void Display(int index)
    {
        int totalCnt = 0;
        if (50 * (index + 1) <= GuildBossManager.Instance.m_BoxUnGetCount)
        {
            totalCnt = 50;
        }
        else
        {
            totalCnt = GuildBossManager.Instance.m_BoxUnGetCount - 50 * index;
        }
 
        int cnt = Mathf.CeilToInt(totalCnt / 10f);
        for (int i = 0; i < cells.Length; i++)
        {
            cells[i].gameObject.SetActive(i < cnt);
            cells[i].Display((i+1)*10 <= totalCnt ? 10 : totalCnt - i*10);
        }
    }
}