Exemplo n.º 1
0
    /// <summary>
    /// 打开大转盘窗口测试
    /// </summary>
    private void LotteryWheelWindow()
    {
        LotteryWheelWindowEntity lotteryWheelWindowEntity = new LotteryWheelWindowEntity();

        lotteryWheelWindowEntity.useable = 5;
        lotteryWheelWindowEntity.total   = 10;
        List <lotteryWheelEntity> lstLotteryWheelEntity = new List <lotteryWheelEntity>();

        for (int i = 0; i < 12; i++)
        {
            lstLotteryWheelEntity[i].id      = i;
            lstLotteryWheelEntity[i].img_url = "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3725680684,3018861305&fm=27&gp=0.jpg";
            lstLotteryWheelEntity[i].name    = i + "_name";
            lstLotteryWheelEntity[i].type    = GiftType.Again;
        }
        lotteryWheelWindowEntity.prize = lstLotteryWheelEntity;

        TransferData data = new TransferData();

        data.SetValue("surPlusTimeCount", lotteryWheelWindowEntity.useable);
        data.SetValue("totalTimeCount", lotteryWheelWindowEntity.total);
        data.SetValue("lstLotteryWheelEntity", lotteryWheelWindowEntity.prize);

        if (m_UIWelfareActivitiesWindow)
        {
            m_UIWelfareActivitiesWindow.SetLotteryWheel(data);
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// 请求大转盘界面回调
    /// </summary>
    /// <param name="args"></param>
    private void OnRequestLotteryWheelCallBack(NetWorkHttp.CallBackArgs args)
    {
        if (args.HasError)
        {
            ShowMessage("提示", "网络连接失败");
        }
        else
        {
            if (args.Value.code < 0)
            {
                ShowMessage("提示", args.Value.msg);

                return;
            }

            if (args.Value.data == null || args.Value.data.Count == 0)
            {
                return;
            }

            LotteryWheelWindowEntity lotteryWheelWindowEntitiy = LitJson.JsonMapper.ToObject <LotteryWheelWindowEntity>(args.Value.data.ToJson());
            isUseCard          = lotteryWheelWindowEntitiy.is_deduct;
            spendCardDrawCount = lotteryWheelWindowEntitiy.deduct_num;

            TransferData data = new TransferData();

            drawTime = lotteryWheelWindowEntitiy.useable;

            data.SetValue("surPlusTimeCount", lotteryWheelWindowEntitiy.useable);
            data.SetValue("totalTimeCount", lotteryWheelWindowEntitiy.total);
            data.SetValue("lstLotteryWheelEntity", lotteryWheelWindowEntitiy.prize);
            data.SetValue("BgURL", lotteryWheelWindowEntitiy.ac_bg);
            data.SetValue("buttonURL", lotteryWheelWindowEntitiy.ac_cj);

            if (m_UIWelfareActivitiesWindow)
            {
                m_UIWelfareActivitiesWindow.SetLotteryWheel(data);
            }
        }
    }