Пример #1
0
 public void SetActiveButton(GazeableButtons activeButton)
 {
     if (currentActiveButton != null)
     {
         currentActiveButton.SetButtonColor(unselectedColor);
     }
     if (activeButton != null && currentActiveButton != activeButton)
     {
         currentActiveButton = activeButton;
         currentActiveButton.SetButtonColor(selectedColor);
     }
     else
     {
         Debug.Log("Resetting");
         currentActiveButton        = null;
         Player.instance.activeMode = InputMode.NONE;
     }
 }
Пример #2
0
    public void SetActiveButton(GazeableButtons activeButton)
    {
        //If there was a previously active Button, disable it.
        if (currentSelectedButton != null)
        {
            currentSelectedButton.SetButtonColor(unselectedColor);
        }

        if (activeButton != null && currentSelectedButton != activeButton)
        {
            currentSelectedButton = activeButton;
            currentSelectedButton.SetButtonColor(selectedColor);
        }

        else
        {
            Debug.Log("Resetting");
            currentSelectedButton = null;
            SpaceShuttleSystemInstance.instance.activeMode = SpaceShuttleSystemInstance.InputModes.NONE;
        }
    }