예제 #1
0
    private IEnumerator ActivateButton()
    {
        // If the camera is already fading, ignore.
        if (m_CameraFade.IsFading)
        {
            yield break;
        }

        // If anything is subscribed to the OnButtonSelected event, call it.
        if (OnButtonSelected != null)
        {
            OnButtonSelected(this);
        }

        // Wait for the camera to fade out.
        yield return(StartCoroutine(m_CameraFade.BeginFadeOut(true)));

        ViewController view = GameObject.Find("ViewController").GetComponent <ViewController>();

        view.startImg = gameObject.GetComponent <Thumbnail>().number;

        SceneManager.LoadScene("Gallery360_CubeMap");

        /*    if (view.isStereo)
         *      SceneManager.LoadScene("Gallery_CubeMap", LoadSceneMode.Single);
         *  else
         *      SceneManager.LoadScene("Gallery_CubeMap_LeftOnly", LoadSceneMode.Single);
         */
        m_CameraFade.FadeInBlack(true);
    }
예제 #2
0
        private IEnumerator ActivateButton()
        {
            // If the camera is already fading, ignore.
            if (m_CameraFade.IsFading)
            {
                yield break;
            }

            // If anything is subscribed to the OnButtonSelected event, call it.
            if (OnButtonSelected != null)
            {
                OnButtonSelected(this);
            }

            // Wait for the camera to fade out.
            yield return(StartCoroutine(m_CameraFade.BeginFadeOut(true)));

            //For varied button interaction
            CubeController    cc;
            CubeController    cc2;
            GalleryController gc;
            ViewController    view = GameObject.Find("ViewController").GetComponent <ViewController>();


            string itemName = m_InteractiveItem.name;

            switch (itemName)
            {
            case "Forward":
                /*if (view.isStereo)
                 * {*/
                cc  = GameObject.Find("LeftCube").GetComponent <CubeController>();
                cc2 = GameObject.Find("RightCube").GetComponent <CubeController>();
                cc.LoadTextures(true);
                cc2.LoadTextures(true);

                /*}
                 * else
                 * {
                 *  cc = GameObject.Find("BothCube").GetComponent<CubeController>();
                 *  cc.LoadTextures(true);
                 * }*/
                break;

            case "Back":
                /* if (view.isStereo)
                 * {*/
                cc  = GameObject.Find("LeftCube").GetComponent <CubeController>();
                cc2 = GameObject.Find("RightCube").GetComponent <CubeController>();
                cc.LoadTextures(false);
                cc2.LoadTextures(false);

                /* }
                 * else
                 * {
                 *   cc = GameObject.Find("BothCube").GetComponent<CubeController>();
                 *   cc.LoadTextures(false);
                 * }*/
                break;

            case "Leave":
                SceneManager.LoadScene(m_SceneToLoad, LoadSceneMode.Single);
                break;

            case "Toggle":
                gc = GameObject.Find("Gallery").GetComponent <GalleryController>();
                gc.ToggleStereo();
                break;

                /*	    case "StereoscopicMenu":
                 *  view.isStereo = true;
                 *  SceneManager.LoadScene(m_SceneToLoad, LoadSceneMode.Single);
                 *  break;
                 *          case "Regular360Menu":
                 *  view.isStereo = false;
                 *  SceneManager.LoadScene(m_SceneToLoad, LoadSceneMode.Single);
                 *  break;*/
            }

            m_CameraFade.FadeInBlack(true);
        }