少年修仙传客户端代码仓库
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
40
41
42
43
44
45
46
47
using vnxbqy.UI;
using System;
 
using UnityEngine.UI;
 
class WeddingSugarCell : ILBehaviour
{
    Text nameTxt;
    Button selectBtn;
    Image selectImg;
 
 
    protected override void Awake()
    {
        nameTxt = proxy.GetWidgtEx<Text>("tagName");
        selectImg = proxy.GetWidgtEx<Image>("SelectImage");
        selectBtn = proxy.GetWidgtEx<Button>("selectBtn");
    }
 
 
 
    public void Display(int index)
    {
        var info = WeddingModel.Instance.candyInfoList[index];
        uint playerID = info.PlayerIDA;
        nameTxt.text = Language.Get("weddingSugar3", info.PlayerNameA, info.PlayerNameB, ILMarryConfig.Get(info.BridePriceID).Name);
        nameTxt.color = UIHelper.GetUIColor(info.FreeEatCandyCount > 0 ? TextColType.Green : TextColType.White);
        selectImg.SetActiveIL(playerID == WeddingModel.Instance.selectCandyBanquet.PlayerIDA);
        selectBtn.SetListener(() => {
            WeddingModel.Instance.isClickCandyList = true;
            WeddingModel.Instance.selectCandyBanquet = new WeddingModel.CandyInfo() {
                PlayerIDA = info.PlayerIDA,
                PlayerNameA = info.PlayerNameA,
                PlayerIDB = info.PlayerIDB,
                PlayerNameB = info.PlayerNameB,
                BridePriceID = info.BridePriceID,
                EndTime = info.EndTime,
                Prosperity = info.Prosperity,
                FireworksPlayerBuyCount = info.FireworksPlayerBuyCount,
                FireworksTotalBuyCount = info.FireworksTotalBuyCount,
                FreeEatCandyCount = info.FreeEatCandyCount,
            };
        });
    }
 
 
}