示例#1
0
 //更新显示
 void UpdateShow()
 {
     twoCharge = ConfigMng.Instance.GetTwoChargeRef(1);
     if (twoCharge != null)
     {
         if (GameCenter.twoChargeMng.stage == 1)
         {
             rechargeBtn.gameObject.SetActive(false);
             receiveBtn.gameObject.SetActive(true);
         }
         else
         {
             rechargeBtn.gameObject.SetActive(true);
             receiveBtn.gameObject.SetActive(false);
         }
         for (int i = 0, max = items.Length; i < max; i++)
         {
             if (twoCharge.reward.Count > i)
             {
                 items[i].FillInfo(new EquipmentInfo(twoCharge.reward[i].eid, twoCharge.reward[i].count, EquipmentBelongTo.PREVIEW));
                 nameLabel[i].gameObject.SetActive(false);
             }
             else
             {
                 items[i].gameObject.SetActive(false);
             }
         }
     }
 }
示例#2
0
    /// <summary>
    /// 获得领取奖励关闭二冲奖励界面
    /// </summary>
    /// <param name="pt"></param>
    protected void S2C_GetTwoChargeRewared(Pt pt)
    {
        pt_update_second_recharge_reward_c133 msg = pt as pt_update_second_recharge_reward_c133;

        if (msg != null)
        {
            stage = msg.status;
            SetLoveRedRemind();
            if (stage == 1)
            {
                TwoChargeRef TwoCharge = ConfigMng.Instance.GetTwoChargeRef(1);
                if (TwoCharge == null)
                {
                    GameCenter.twoChargeMng.isOpenTwoCharge = false;
                }
                if (OnOpenTwoChargeUpdate != null)
                {
                    OnOpenTwoChargeUpdate();
                }
            }
            else if (stage == 2)
            {
                isOpenTwoCharge = false;
                //GameCenter.uIMng.ReleaseGUI(GUIType.PRIVILEGE);
                if (twoChargeWnd != null)
                {
                    twoChargeWnd.CloseUI();
                }
            }
        }
    }