예제 #1
0
    public void CheckForInput()
    {
        if (GamepadInput.GetDown(InputOption.B_BUTTON))
        {
            Debug.Log("B button was pressed down! Going back one level.");

            SceneManager.LoadScene("Main");
        }

        if (GamepadInput.GetDown(InputOption.START_BUTTON))
        {
            Debug.Log("The start button was pressed down! Going back to Main Menu");

            SceneManager.LoadScene("Main");
        }

        if (GamepadInput.Get(InputOption.LEFT_STICK_HORIZONTAL))
        {
            float stickValue = GamepadInput.GetInputValue(InputOption.LEFT_STICK_HORIZONTAL);

            if (stickValue > 0)
            {
                Debug.Log("Left analog stick pushed to the right!");
            }
            else if (stickValue < 0)
            {
                Debug.Log("Left analog stick pushed to the left!");
            }
        }
    }
예제 #2
0
    public void Update()
    {
        if (GamepadInput.GetDown(InputOption.Y_BUTTON) && CAVECameraRig.instance != null)
        {
            CAVECameraRig.instance.Toggle3D();
        }

        if (GamepadInput.GetDown(InputOption.B_BUTTON))
        {
            Debug.Log("HOME PRESSED");
            // Loads the first scene. Assumed to be the home scene.
            StartCoroutine(GoHome());
        }

        if (GamepadInput.GetDown(InputOption.X_BUTTON))
        {
            if (InfoCanvas.infoText == "")
            {
                InfoCanvas.infoText = SiteManager.activeSiteElement.GetDescription();
            }
            else
            {
                InfoCanvas.infoText = "";
            }
        }

        if (GamepadInput.GetDown(InputOption.A_BUTTON))
        {
            if (SiteManager.activeSiteElementSet != null)
            {
                SiteManager.activeSiteElementSet.NextElement();
            }
        }
    }
예제 #3
0
    private void Update()
    {
        CheckIfPOISelected();

        if (selectedPOI != null && GamepadInput.GetDown(GamepadInput.InputOption.B_BUTTON))
        {
            selectedPOI.Deactivate();
        }
    }
예제 #4
0
    // Update is called once per frame
    void Update()
    {
        // If the A button is pressed, select the active button.
        if (GamepadInput.GetDown(InputOption.A_BUTTON))
        {
            // If there's no selected element, we first must choose a site. Otherwise, select the data type.
            if (selectedElementIndex < 0)
            {
                SelectSiteButton(siteButtons[selectedSiteIndex]);
            }
            else
            {
                SelectSiteSetButton(siteElementButtons[selectedElementIndex]);
            }
        }

        // If B is pressed, go back and deselect the active element.
        if (GamepadInput.GetDown(InputOption.B_BUTTON))
        {
            ClearElementButtons();
        }

        // If the right stick is pushed, move buttons left or right.
        if (GamepadInput.GetDown(InputOption.LEFT_STICK_HORIZONTAL))
        {
            // The direction of the stick. Helps us determine what direction it was pushed.
            float stickValue = GamepadInput.GetInputValue(InputOption.LEFT_STICK_HORIZONTAL);

            // If pushed to the right, move selected button to the right.
            if (stickValue > 0)
            {
                // If there's no selected element, move the site buttons. Otherwise move the data type buttons.
                if (selectedElementIndex < 0)
                {
                    MoveSiteButtons(1);
                }
                else
                {
                    MoveElementButtons(1);
                }
            }

            // If pushed to the left, move selected button to the left.
            else if (stickValue < 0)
            {
                if (selectedElementIndex < 0)
                {
                    MoveSiteButtons(-1);
                }
                else
                {
                    MoveElementButtons(-1);
                }
            }
        }
    }
예제 #5
0
 public void Update()
 {
     if (GamepadInput.GetDown(InputOption.A_BUTTON))
     {
         if (cubemaps.Count > 1)
         {
             CycleCubemap();
             Debug.Log("Cycling Cubemap");
         }
     }
 }
예제 #6
0
    public void Update()
    {
        if (GamepadInput.GetDown(GamepadInput.InputOption.START_BUTTON))
        {
            cameraRig.Toggle3D();
        }

        if (GamepadInput.GetDown(GamepadInput.InputOption.BACK_BUTTON))
        {
            // Loads the first scene. Assumed to be the home scene.
            GoHome();
        }
    }
    public void Update()
    {
        if (GamepadInput.GetDown(GamepadInput.InputOption.RIGHT_TRIGGER))
        {
            if (!controlsPanelActive)
            {
                Debug.Log("Going Up");

                GameManager.instance.inputGuide.MovePanelUp();
            }
            else
            {
                GameManager.instance.inputGuide.MovePanelDown();
            }
        }
    }
예제 #8
0
    public void CheckForInput()
    {
        if (GamepadInput.GetDown(InputOption.B_BUTTON))
        {
            Debug.Log("B button was pressed down! Going back one level.");

            SceneManager.LoadScene("VideoMenu_Scene");
        }

        if (GamepadInput.GetDown(InputOption.START_BUTTON))
        {
            Debug.Log("The start button was pressed down! Going back to Main Menu");

            SceneManager.LoadScene("Main");
        }
    }
예제 #9
0
    public void CheckIfPOISelected()
    {
        if (selectedPOI == null && GamepadInput.GetDown(GamepadInput.InputOption.A_BUTTON))
        {
            RaycastHit cameraRaycast = CameraViewpoint.GetRaycast();

            if (cameraRaycast.collider != null)
            {
                POI hitPOI = cameraRaycast.collider.GetComponent <POI>();

                if (hitPOI != null)
                {
                    hitPOI.Toggle(gameManager);
                }
            }
        }
    }
예제 #10
0
    public void Update()
    {
        if (monitorButtonsActive && !PhotoController.photosActive && !PhotoController.photosLoading)
        {
            if (readyForInput == false)
            {
                if (GamepadInput.GetUp(GamepadInput.InputOption.A_BUTTON))
                {
                    readyForInput = true;
                }
            }

            if (GamepadInput.GetDown(GamepadInput.InputOption.A_BUTTON) && readyForInput)
            {
                monitorButtons[selectedButtonIndex].ToggleButton();
            }

            if (GamepadInput.GetDown(GamepadInput.InputOption.LEFT_STICK_HORIZONTAL))
            {
                float value = GamepadInput.GetInputValue(GamepadInput.InputOption.LEFT_STICK_HORIZONTAL);

                if (value < 0)
                {
                    SelectNextButton(-1);
                }
                else if (value > 0)
                {
                    SelectNextButton(1);
                }
            }

            else if (GamepadInput.GetDown(GamepadInput.InputOption.RIGHT_STICK_HORIZONTAL))
            {
                float value = GamepadInput.GetInputValue(GamepadInput.InputOption.RIGHT_STICK_HORIZONTAL);

                if (value < 0)
                {
                    SelectNextButton(-1);
                }
                else if (value > 0)
                {
                    SelectNextButton(1);
                }
            }
        }
    }
예제 #11
0
    public void CheckForInput()
    {
        if (GamepadInput.GetDown(InputOption.A_BUTTON))
        {
            Debug.Log("A button was pressed down!");
        }

        if (GamepadInput.Get(InputOption.A_BUTTON))
        {
            Debug.Log("A button is being held down!");
        }

        if (GamepadInput.GetUp(InputOption.A_BUTTON))
        {
            Debug.Log("A button was released!");
        }

        if (GamepadInput.Get(InputOption.LEFT_STICK_HORIZONTAL))
        {
            float stickValue = GamepadInput.GetInputValue(InputOption.LEFT_STICK_HORIZONTAL);

            if (stickValue > 0)
            {
                Debug.Log("Left analog stick pushed to the right!");
            }
            else if (stickValue < 0)
            {
                Debug.Log("Left analog stick pushed to the left!");
            }
        }

        if (GamepadInput.Get(InputOption.RIGHT_STICK_VERTICAL))
        {
            float stickValue = GamepadInput.GetInputValue(InputOption.RIGHT_STICK_VERTICAL);

            if (stickValue > 0)
            {
                Debug.Log("Right stick pushed up!");
            }
            else if (stickValue < 0)
            {
                Debug.Log("Right stick pushed down!");
            }
        }
    }
예제 #12
0
    void Update()
    {
        if (photosActive)
        {
            if (GamepadInput.GetDown(GamepadInput.InputOption.RIGHT_STICK_HORIZONTAL))
            {
                MovePhotosOnInput(GamepadInput.InputOption.RIGHT_STICK_HORIZONTAL);
            }

            else if (GamepadInput.GetDown(GamepadInput.InputOption.LEFT_STICK_HORIZONTAL))
            {
                MovePhotosOnInput(GamepadInput.InputOption.LEFT_STICK_HORIZONTAL);
            }

            if (GamepadInput.GetDown(GamepadInput.InputOption.RIGHT_STICK_VERTICAL))
            {
                MovePhotosOnInput(GamepadInput.InputOption.RIGHT_STICK_VERTICAL);
            }

            else if (GamepadInput.GetDown(GamepadInput.InputOption.LEFT_STICK_VERTICAL))
            {
                MovePhotosOnInput(GamepadInput.InputOption.LEFT_STICK_VERTICAL);
            }
        }

        if (GamepadInput.GetDown(GamepadInput.InputOption.B_BUTTON))
        {
            if (photosLoading)
            {
                StopAllCoroutines();
                UnloadPhotos();
            }
            else if (photosActive)
            {
                UnloadPhotos();
            }
        }
    }
예제 #13
0
    private void Update()
    {
        if (GamepadInput.GetDown(GamepadInput.InputOption.LEFT_TRIGGER))
        {
            if (bookmarkPanelActive)
            {
                MovePanelDown();
            }
            else
            {
                MovePanelUp();
            }
        }

        if (bookmarkPanelActive && !PlatformMonitor.monitorButtonsActive)
        {
            if (GamepadInput.GetDown(GamepadInput.InputOption.LEFT_STICK_VERTICAL))
            {
                float stickValue = GamepadInput.GetInputValue(GamepadInput.InputOption.LEFT_STICK_VERTICAL);

                if (stickValue < 0)
                {
                    MoveSelectorDown();
                }

                else
                {
                    MoveSelectorUp();
                }
            }

            if (GamepadInput.GetDown(GamepadInput.InputOption.A_BUTTON))
            {
                SelectBookmark();
            }
        }
    }