OneShotOneKill/Assets/Script/UGUI/Ingame/GainCardList.cs

39 lines
1.2 KiB
C#
Raw Normal View History

2026-01-07 21:27:42 +00:00
using System.Collections.Generic;
using UnityEngine.UI;
public class GainCardList : uScrollViewMgr
{
public GridLayoutGroup m_Grid;
public void Set(List<CardListTableData> lst)
{
var totallst = new List<CardListTableData>();
for (int i = 0; i < lst.Count; i++)
totallst.Add(lst[i]);
{
var makecount = 12 - totallst.Count;
for (int i = 0; i < makecount; i++)
totallst.Add(null);
}
//if (totallst.Count < 6)
//{
// var makecount = 6 - totallst.Count;
// for (int i = 0; i < makecount; i++)
// totallst.Add(null);
// m_Content.transform.localScale = Vector2.one;
// (m_Content.transform as RectTransform).sizeDelta = new Vector2(794f, 451f);
//}
//else if (totallst.Count > 6)
//{
// var makecount = 15 - totallst.Count;
// for (int i = 0; i < makecount; i++)
// totallst.Add(null);
// m_Content.transform.localScale = Vector2.one * 0.66f;
// (m_Content.transform as RectTransform).sizeDelta = new Vector2(1195f, 303f);
//}
Set_ScrollView(totallst);
}
}