示例#1
0
    public void Refresh()
    {
        switch (PrivilegeType)
        {
        case EPrivilegeType.eMonth:
            IconTextLab.text = "月";
            DesLab.text      = "金色扭蛋币:3个/每天\n金币:100个/每天\n糖果:100个/每天";
            if (isNet())
            {
                if (GetGoodsInfo())
                {
                    PriceLab.text = StringBuilderTool.ToInfoString("¥", CurGoodsInfo.GetPriceStr());
                }
            }
            else
            {
                PriceLab.text = "¥30";
            }
            break;

        case EPrivilegeType.eSeason:
            IconTextLab.text = "季";
            DesLab.text      = "金色扭蛋币:4个/每天\n金币:200个/每天\n糖果:200个/每天";
            if (isNet())
            {
                if (GetGoodsInfo())
                {
                    PriceLab.text = StringBuilderTool.ToInfoString("¥", CurGoodsInfo.GetPriceStr());
                }
            }
            else
            {
                PriceLab.text = "¥68";
            }
            break;

        case EPrivilegeType.eYear:
            IconTextLab.text = "年";
            DesLab.text      = "金色扭蛋币:5个/每天\n金币:300个/每天\n糖果:300个/每天";
            if (isNet())
            {
                if (GetGoodsInfo())
                {
                    PriceLab.text = StringBuilderTool.ToInfoString("¥", CurGoodsInfo.GetPriceStr());
                }
            }
            else
            {
                PriceLab.text = "¥198";
            }
            break;
        }

        RefreshResidueTime();
    }
示例#2
0
    public void Pay(GoodsInfo CurWaitBuyGoodsInfo)
    {
        Debug.Log("支付");

#if UNITY_ANDROID
        TDGAVirtualCurrency.OnChargeRequest(GameApp.Instance.Platform.PlatformInfo.orderId, CurWaitBuyGoodsInfo.ID.ToString(), CurWaitBuyGoodsInfo.GetPrice(), "CH", CurWaitBuyGoodsInfo.GetPrice(), "LePay");
#endif

        LePayInfo tempPI = new LePayInfo(CurWaitBuyGoodsInfo.GetPriceStr(),
                                         CurWaitBuyGoodsInfo.ID.ToString(), CurWaitBuyGoodsInfo.Name, CurWaitBuyGoodsInfo.Des,
                                         "http://platform01.baobaolong.club/platform/billing/callback/letvCallback", GameApp.Instance.Platform.PlatformInfo.orderId);

        if (CallSDKFun("Pay", tempPI.ToString(SDKInfo)))
        {
            GameApp.SendMsg.StartWaitUI();
            InvokeRepeating("UpdatePayRes", 0, 0.5f);
        }
    }