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

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

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

            m_MonoDriver.StartCoroutine(InnerLoadGamepadQRCode(tcs, url));
            return(tcs.Task);
        }
Exemplo n.º 2
0
        public void Running()
        {
            if (Input.touchCount >= 4 && itCanBeVisible)
            {
                itCanBeVisible = false;
                RefreshWindow();
                visible = !visible;
                monoDriver.StartCoroutine(DelaySetVisible());
            }

            if (((Input.GetKey(KeyCode.DownArrow) && Input.GetKey(KeyCode.LeftArrow) && Input.GetKey(KeyCode.RightArrow)) ||
                 Input.GetKeyDown(KeyCode.Alpha0)) &&
                itCanBeVisible)
            {
                itCanBeVisible = false;
                RefreshWindow();
                visible = !visible;
                monoDriver.StartCoroutine(DelaySetVisible());
            }

            if (App.HasBind <IInput>())
            {
                //清理日志
                if (LTInput.GetKeyDown(KeyCode2.X))
                {
                    logs.Clear();
                }

                //堆栈开关
                if (LTInput.GetKeyDown(KeyCode2.Y))
                {
                    StackLog = !StackLog;
                }

                if (LTInput.GetKey(KeyCode2.Down))
                {
                    scrollPosition += new Vector2(0, 10);
                }

                if (LTInput.GetKey(KeyCode2.Up))
                {
                    scrollPosition -= new Vector2(0, 10);
                }
            }
        }