Exemplo n.º 1
0
        // The update method is called for every frame
        // We check if there has been a planet interaction and update accordingly if we have guessed for a location or not.
        void Update()
        {
            OVRInput.Update(); // Call before checking the input
            if (OVRInput.Get(OVRInput.Button.One) && (RayPointer.hasGuessed || !_gameStarted))
            {
                hideSplash();

                if (RayPointer.hasGuessed)
                {
                    hideScoreSplash();
                }

                if (nextLocation != null)
                {
                    currentLocation = nextLocation;
                }

                nextLocation = GMAPS.GetNewStreetViewCoordinates();
                TextureHelper.UpdateSkybox();
                TextureHelper.cacheTextureSkybox(nextLocation);

                _globeTransform.localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
            }

            if (OVRInput.Get(OVRInput.Button.Three) && _gameStarted && !tutorialVisible)
            {
                tutorialVisible = true;
                _controllerTutorial.SetActive(true);
            }
            if (!OVRInput.Get(OVRInput.Button.Three) && _gameStarted && tutorialVisible)
            {
                tutorialVisible = false;
                _controllerTutorial.SetActive(false);
            }
        }
Exemplo n.º 2
0
        void Start()
        {
            //we attach the game objects to the actual scene object so that we can manipulate them with our code
            initializeGameObjects();

            //change the visibility of GUI elements
            changeScoreVisibility(false);
            changeRoundVisibility(false);
            changeConfirmVisibility(false);
            changeIntroSplashVisibility(true);
            changeFinalRoundVisibility(false);

            currentLocation = GMAPS.GetNewStreetViewCoordinates();
            TextureHelper.cacheTextureSkybox(currentLocation);
        }