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<VipModel>(); } }
|
protected override void Awake()
|
{
|
itemCell = proxy.GetWidgtEx<ItemCell>("ItemCell");
|
}
|
|
public void Display(int index)
|
{
|
int showCtgID = LimitedTimeLuxuryGiftModel.Instance.showCtgId;
|
|
List<Item> awards = new List<Item>();
|
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);
|
});
|
}
|
|
}
|