//--------------------------------------------------------
|
// [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);
|
}
|
}
|
}
|
|
|
|
|
|