Ejemplo n.º 1
0
    IEnumerator Held()
    {
        //Debug.Log("held 1");
        while (appInfo.GetUnusedButtonStatus() == ButtonStatus.Held)
        {
            transform.parent.parent = appInfo.GetRightController();
            yield return(null);

            transform.parent.parent = GameObject.Find("TutoriWidgets").transform;
        }
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (rController == null)
        {
            rController = appInfo.GetRightController();
        }
        if (lController == null)
        {
            lController = appInfo.GetLeftController();
        }
        rStat = appInfo.GetUnusedButtonStatus();
        //lStat = appInfo.GetLeftTriggerStatus();
        GameObject o1 = checkRay(rController, rStat, rLine);
        //GameObject o2 = checkRay(lController, lStat, lLine);

        List <GameObject> toBeRemoved = new List <GameObject>();

        foreach (GameObject o in regColor.Keys)
        {
            //if (!o.Equals(o1) && !o.Equals(o2))
            //{
            //    o.GetComponent<Renderer>().material.color = regColor[o];
            //    toBeRemoved.Add(o);
            //}
            if (!o.Equals(o1))
            {
                o.GetComponent <Renderer>().material.color = regColor[o];
                toBeRemoved.Add(o);
            }
        }
        foreach (GameObject o in toBeRemoved)
        {
            regColor.Remove(o);
        }
    }
Ejemplo n.º 3
0
    ///*IEnumerator EnableEffect()*/
    //    {
    //        // Debug.Log("EnableEffect 1");
    //        //  txt.text="4s";
    //        transform.parent.parent =GameObject.Find("TutoriWidgets").transform;
    //        gameObject.GetComponent<Renderer>().material = stopButton;
    //        // Debug.Log("EnableEffect 2");
    //       //RealMethod();
    //    }


    IEnumerator Held()
    {
        Debug.Log("held 1");
        while (appInfo.GetUnusedButtonStatus() == ButtonStatus.Held)
        {
            if (transform.parent.GetComponent <VRVideoPlayer>().stereoMode == StereoMode.NONE)
            {
                transform.parent.parent = appInfo.GetRightController();
                yield return(null);

                transform.parent.parent = GameObject.Find("VRVideoPlayer_UI (1)").transform;
            }
            else if (transform.parent.GetComponent <VRVideoPlayer>().stereoMode == StereoMode.LEFT_RIGHT)
            {
                transform.parent.parent = appInfo.GetRightController();
                yield return(null);

                transform.parent.parent = GameObject.Find("TutoriWidgets").transform;
            }
        }
    }