コード例 #1
0
    private void HandleTriggerClicked(object sender, ClickedEventArgs e)
    {
        //Debug.Log("Trigger click: " + sender.ToString() + " " + e.ToString());

        // User pulled the trigger. Let's do something!
        // Actually, let the gaze controller handle it
        myGazeController.HandleTriggerPull();
    }
コード例 #2
0
    // Update is called once per frame
    void Update()
    {
        // Trigger emulation
        if (Input.GetKey("space"))
        {
            myGazeController.HandleTriggerPull();
        }


        // Head rotation:
        if (Input.GetKey("up"))
        {
            transform.Rotate(-rotSpeed * Vector3.right * Time.deltaTime);
        }

        if (Input.GetKey("down"))
        {
            transform.Rotate(rotSpeed * Vector3.right * Time.deltaTime);
        }

        if (Input.GetKey("right"))
        {
            transform.Rotate(rotSpeed * Vector3.up * Time.deltaTime, Space.World);
        }

        if (Input.GetKey(KeyCode.LeftArrow))
        {
            transform.Rotate(-rotSpeed * Vector3.up * Time.deltaTime, Space.World);
        }


        // Increase or decrease binaural cue value for method of adjustment task
        //if(Input.GetKeyDown("z"))
        //{
        //	btnCounterZ = btnCounterZ - 1;
        //	Debug.Log (btnCounterZ);
        //}

        //if(Input.GetKeyDown("x"))
        //{
        //	btnCounterX = btnCounterX + 1;
        //	Debug.Log (btnCounterX);
        //}


        // stop the standard-probe MOA task loop
        //if (Input.GetKey (KeyCode.End))
        //{
        //	END = 1;
        //}
    }