Exemple #1
0
    public void updateItem(BackRecharge br, NoticeSample noticeSample, Notice notice)
    {
        backRecharge = br;
        res          = br.getRechargeSample();
        this.notice  = notice;
        this.sample  = noticeSample;
        changeButton();
        receiveButton.fatherWindow = fatherWindow.win;
        receiveButton.content      = fatherWindow;
        receiveButton.updateButton(br);
        setItemText();
        if (awardButtons == null)
        {
            awardButtons = new GoodsView[4];
            for (int i = 0; i < awardButtons.Length; i++)
            {
                awardButtons [i] = NGUITools.AddChild(showAwardPos, goodsViewPre).GetComponent <GoodsView> ();
                awardButtons [i].transform.localPosition = new Vector3(i * 120, 0, 0);
                awardButtons [i].fatherWindow            = fatherWindow.win;
                awardButtons [i].gameObject.SetActive(false);
            }

            //显示充值奖励内容 位移差X=120
            for (int i = 0; i < res.prizes.Length && i < 4; i++)
            {
                awardButtons [i].gameObject.SetActive(true);
                awardButtons [i].init(res.prizes [i]);
            }
        }
        else
        {
            for (int i = 0; i < awardButtons.Length; i++)
            {
                awardButtons [i].gameObject.SetActive(false);
            }
            for (int i = 0; i < res.prizes.Length && i < 4; i++)
            {
                awardButtons [i].gameObject.SetActive(true);
                awardButtons [i].init(res.prizes [i]);
            }
        }
    }
Exemple #2
0
 public void updateButton(BackRecharge recharge)
 {
     this.recharge = recharge;
 }