少年修仙传客户端代码仓库
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
using vnxbqy.UI;
using System.Collections.Generic;
 
public class LimitedTimeLuxuryGiftButtonCell : ILBehaviour
{
    ButtonEx btnMoney;
    TextEx txtMoney;
    ImageEx imgMoney;
 
    VipModel vipModel { get { return ModelCenter.Instance.GetModelEx<VipModel>(); } }
    protected override void Awake()
    {
        btnMoney = proxy.GetWidgtEx<ButtonEx>("btnMoney");
        txtMoney = proxy.GetWidgtEx<TextEx>("txtMoney");
        imgMoney = proxy.GetWidgtEx<ImageEx>("btnMoney");
    }
 
    public void Display(int ctgId)
    {
        int showCtgID = LimitedTimeLuxuryGiftModel.Instance.showCtgId;
 
        OrderInfoConfig orderCfg;
        vipModel.TryGetOrderInfo(ctgId, out orderCfg);
        txtMoney.text = Language.Get("NeedMoney", orderCfg.PayRMBNum);
        imgMoney.sprite = UILoader.LoadSprite("XSHL2");
        if (ctgId == showCtgID)
        {
            imgMoney.sprite = UILoader.LoadSprite("XSHL1");
        }
        btnMoney.SetListener(() =>
        {
            LimitedTimeLuxuryGiftModel.Instance.showCtgId = ctgId;
        });
    }
 
}