少年修仙传客户端代码仓库
hch
3 天以前 600733c8f592cb9e65f2b7a3e110ac1d686e6bfe
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
38
39
using vnxbqy.UI;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine;
 
public class LuckyCloudAwardCell : ILBehaviour
{
    ItemCell itemCell;
    Text time;
    Text num;
    Text name;
 
    protected override void Awake() 
    {
        itemCell = proxy.GetWidgtEx<ItemCell>("itemCell");
        time = proxy.GetWidgtEx<Text>("time");
        num = proxy.GetWidgtEx<Text>("num");
        name = proxy.GetWidgtEx<Text>("name");
    }
 
 
    //index档位字典的数组索引
    public void Display(int index)
    {
        LuckyCloudBuyModel.LotteryRecInfo awards = LuckyCloudBuyModel.Instance.m_LotteryRecList[index];
        var itemID = awards.SuperItemID;
        var itemModel = new ItemCellModel((int)itemID, false, (ulong)awards.SuperItemCount);
        itemCell.Init(itemModel);
        itemCell.button.SetListener(() => {
            ItemTipUtility.Show((int)itemID);
        });
 
        time.text = awards.LotteryTime;
        num.text = awards.LotteryNum.ToString();
        name.text = awards.PlayerName;
    }
 
 
}