using LitJson; using vnxbqy.UI; using System.Collections.Generic; using System.Linq; using UnityEngine; public class LimitedTimeLuxuryGiftItemCell : ILBehaviour { ItemCell itemCell; VipModel vipModel { get { return ModelCenter.Instance.GetModelEx(); } } protected override void Awake() { itemCell = proxy.GetWidgtEx("ItemCell"); } public void Display(int index) { int showCtgID = LimitedTimeLuxuryGiftModel.Instance.showCtgId; List awards = new List(); vipModel.TryGetRechargeItem(showCtgID, out awards); int itemId = awards[index].id; var model = new ItemCellModel(itemId, false, (ulong)awards[index].count); itemCell.Init(model); itemCell.button.SetListener(() => { ItemTipUtility.Show(itemId); }); } }