Exemplo n.º 1
0
        /// <inheritdoc />
        public LTTask <Sprite> GetLinkQRCodeAsync(int width = 188, int height = 188)
        {
            string url = "";

            if (m_BridgeClass != null)
            {
                url = m_BridgeClass.CallStatic <string>("getQRcodePathByIP", width, height, "LinkQRCode.png");
            }

            LTLog.Debug($"url:{url}");
            LTTaskCompletionSource <Sprite> tcs = LTTaskCompletionSource.New <Sprite>();

            m_MonoDriver.StartCoroutine(InnerLoadGamepadQRCode(tcs, url));
            return(tcs.Task);
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public LTTask <PaymentResult> PaymentAsync(string payid)
        {
            m_PaymentTcs = LTTaskCompletionSource.New <PaymentResult>();

            if (m_BridgeClass == null)
            {
                //如果未接sdk,则模拟一个支付成功的结果
                PaymentResult result = new PaymentResult();
                result.code  = "100";
                result.payid = payid;
                result.text  = "订购成功.";

                m_PaymentTcs.SetResult(result);
            }
            else
            {
                m_BridgeClass.CallStatic("payment", payid, "");
            }

            return(m_PaymentTcs.Task);
        }