Exemplo n.º 1
0
        private void Update()
        {
            if (operation.Count != 0)
            {
                string op = operation[0];
                sc.ClientTask(op);
                operation.Remove(op);
            }
            if (Input.GetKeyDown(KeyCode.A))
            {
                sc.ClientTask("Touch:Open");
            }
            if (Input.GetKeyDown(KeyCode.S))
            {
                sc.ClientTask("Touch:Close");
            }

            if (CameraSystem.testMode)
            {
                if (testCamera.transform.eulerAngles.x < 28)
                {
                    appLayer.transform.eulerAngles = new Vector3(0, testCamera.transform.eulerAngles.y, 0);
                }
                staticLayer.transform.eulerAngles = testCamera.transform.eulerAngles;
            }
            else
            {
                if (gyroCamera.transform.eulerAngles.x < 28)
                {
                    appLayer.transform.eulerAngles = new Vector3(0, gyroCamera.transform.eulerAngles.y, 0);
                }
                //appLayer.transform.eulerAngles = new Vector3(0, gyroCamera.transform.eulerAngles.y, 0);
                staticLayer.transform.eulerAngles = gyroCamera.transform.eulerAngles;
            }
        }
Exemplo n.º 2
0
        private void Update()
        {
            //info.text = (Camera.main.transform.eulerAngles.x.ToString() + "  " + Camera.main.transform.eulerAngles.y.ToString() + "  " + Camera.main.transform.eulerAngles.z.ToString());

            if (operation.Count != 0)
            {
                string op = operation[0];
                sc.ClientTask(op);
                operation.Remove(op);
                //Debug.Log(op);
            }

            if (Input.GetKeyDown(KeyCode.S))
            {
                sc.ClientTask("Touch:Close");
            }
            if (Input.GetKeyDown(KeyCode.Q))
            {
                Debug.Log("OpenApp:h3");
                sc.SystemTask("OpenApp:h3");
            }
            if (Input.GetKeyDown(KeyCode.W))
            {
                //Debug.Log("OpenApp:h4");
                sc.SystemTask("OpenApp:h4");
            }
            if (Input.GetKeyDown(KeyCode.E))
            {
                //Debug.Log("OpenApp:h6");
                sc.SystemTask("OpenApp:h6");
            }
            if (Input.GetKeyDown(KeyCode.A))
            {
                //Debug.Log("OpenApp:h6");
                sc.SystemTask("OpenApp:v1");
            }
            if (Input.GetKeyDown(KeyCode.S))
            {
                //Debug.Log("OpenApp:h6");
                sc.SystemTask("OpenApp:v3");
            }
            if (Input.GetKeyDown(KeyCode.D))
            {
                //Debug.Log("OpenApp:h6");
                sc.SystemTask("OpenApp:v4");
            }

            if (Input.GetKeyDown(KeyCode.Space))
            {
                //Debug.Log("OpenApp:h6");
                if (systemInfo.activeSelf)
                {
                    OpenAppList();
                }
                else
                {
                    CloseAppList();
                }
            }
            if (Input.GetKeyDown(KeyCode.P))
            {
                Debug.Log("MoveApp");
                sc.SystemTask("MoveApp:122");
            }
            if (Input.GetKeyDown(KeyCode.O))
            {
                Debug.Log("SetApp");
                sc.SystemTask("SetApp:122");
            }
            if (Input.GetKeyDown(KeyCode.I))
            {
                //Debug.Log("OpenApp:h6");
                sc.SystemTask("Rotate:3");
            }
            if (Input.GetKeyDown(KeyCode.U))
            {
                //Debug.Log("OpenApp:h6");
                sc.SystemTask("Rotate:-3");
            }
            if (Input.GetKeyDown(KeyCode.L))
            {
                //Debug.Log("OpenApp:h6");
                if (SystemSetting.isLock)
                {
                    sc.SystemTask("Unlock:0");
                }
                else
                {
                    sc.SystemTask("Lock:0");
                }
            }
            if (Input.GetKeyDown(KeyCode.K))
            {
                sc.SystemTask("RecentApp:123");
            }
            if (Input.GetKeyDown(KeyCode.J))
            {
                sc.SystemTask("ClearCenter:0");
            }

            if (CameraSystem.testMode)
            {
                appLayer.transform.eulerAngles      = new Vector3(testCamera.transform.eulerAngles.x, testCamera.transform.eulerAngles.y, 0);
                appLayer.transform.localEulerAngles = new Vector3(0, appLayer.transform.localEulerAngles.y, 0);
            }
            else
            {
                appLayer.transform.eulerAngles      = new Vector3(gyroCamera.transform.eulerAngles.x, gyroCamera.transform.eulerAngles.y, 0);
                appLayer.transform.localEulerAngles = new Vector3(0, appLayer.transform.localEulerAngles.y, 0);
            }
        }