Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (fove.Gazecast(my_collider))
     {
         menuBar.SetActive(false);
     }
 }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (fove.Gazecast(my_collider))
     {
         MenuSetup();
     }
 }
Exemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     if (fove.Gazecast(my_collider))
     {
         Application.Quit();
     }
 }
Exemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     if (fove.Gazecast(my_collider))
     {
         Debug.Log("123456789");
         Application.LoadLevel(scene[sceneId]);
     }
 }
Exemplo n.º 5
0
    IEnumerator timer3()
    {
        yield return(new WaitForSeconds(1));

        if (fove.Gazecast(my_collider))
        {
            timer_i++;
        }

        //Debug.Log(timer_i);
        if (timer_i > GUIShow && fove.Gazecast(my_collider))
        {
            //Debug.Log("show GUI");
            StartCoroutine("DetailLifeTime");
            timer_i = 0;
        }
        start_Timer3 = true;
    }
Exemplo n.º 6
0
 // Update is called once per frame
 void Update()
 {
     if (fove.Gazecast(my_collider))
     {
         Continue.SetActive(false);
         Options.SetActive(false);
         Quit.SetActive(false);
         category_shop_bed.SetActive(true);
         category_shop_chair.SetActive(true);
         returnButton.SetActive(true);
     }
 }
    // LateUpdate ensures that the object doesn't lag behind the user's head motion
    void FixedUpdate()
    {
        //set value
        rays        = fove.GetGazeRays_Immediate();
        myEyeStruct = FoveInterface.CheckEyesClosed();
        //raycast
        Debug.Log(myEyeStruct.ToString());
        Physics.Raycast(rays.left, out hit, Mathf.Infinity);
        if (fove.Gazecast(hit.collider))
        {
            transform.position = hit.point;

            if (hit.point != Vector3.zero) //&& (myEyeStruct == EFVR_Eye.Right || myEyeStruct == EFVR_Eye.Both))
            {
                transform.position = hit.point;
                //send a message to a destination gameobject

                if (prev == null)
                {
                    //set the prev to the current hit collider

                    prev = hit.collider;
                    Debug.Log("hit collider set collider to my object " + prev.GetType());
                    if (prev.GetComponent <timerScript>() != null)
                    {
                        prev.SendMessage("StartTimer");
                    }
                }
                else if (prev.name != hit.collider.name)
                {
                    if (prev.GetComponent <timerScript>() != null)
                    {
                        prev.SendMessage("StopTimer");
                    }

                    if (hit.collider.GetComponent <timerScript>() != null)
                    {
                        hit.collider.SendMessage("StartTimer");
                    }

                    prev = hit.collider;
                }
            }
        }
    }
Exemplo n.º 8
0
    private GazePosition GetGaze()
    {
        Collider hit;

        if (!fove.Gazecast(1 << 8, out hit))
        {
            return(GazePosition.None);
        }

        switch (hit.gameObject.name)
        {
        case "L Collider":
            return(GazePosition.Left);

        case "R Collider":
            return(GazePosition.Right);

        default:
            return(GazePosition.Centre);
        }
    }