示例#1
0
 private void OnControllerTypeChanged()
 {
     Inputs.Controller newController = InputManager.GetController();
     if (newController == Controller.Other)
     {
         _eventSystem.SetSelectedGameObject(null);
         _currentController = newController;
         Debug.Log("New controller type is other");
     }
     else
     {
         if (_currentMenu == Menus.MainMenu)
         {
             _eventSystem.SetSelectedGameObject(null);
             _eventSystem.SetSelectedGameObject(_menuFirstSelected);
         }
         else if (_currentMenu == Menus.Options)
         {
             _eventSystem.SetSelectedGameObject(null);
             _eventSystem.SetSelectedGameObject(_optionsFirstSelected);
         }
         else if (_currentMenu == Menus.Lobby)
         {
             _eventSystem.SetSelectedGameObject(null);
             _eventSystem.SetSelectedGameObject(_lobbyFirstSelected);
         }
         else if (_currentMenu == Menus.Room)
         {
             _eventSystem.SetSelectedGameObject(null);
             _eventSystem.SetSelectedGameObject(_roomFirstSelected);
         }
         _currentController = newController;
         Debug.Log("New controller type is " + newController);
     }
 }
 private void Awake()
 {
     _networkController = GameObject.FindGameObjectWithTag("NetworkController").GetComponent <NetworkController>();
     _gameController    = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>();
     _soundController   = GameObject.FindGameObjectWithTag("SoundController").GetComponent <SoundController>();
     _inputManager      = GameObject.FindWithTag("InputManager")?.GetComponent <InputManager>();
     _currentController = InputManager.GetController();
 }
示例#3
0
 private void Start()
 {
     _currentController = InputManager.GetController();
     Debug.Log("Menu Controller Start, controller type is" + _currentController);
     if (_currentController == Controller.Playstation || _currentController == Controller.Xbox)
     {
         _eventSystem.SetSelectedGameObject(null);
         _eventSystem.SetSelectedGameObject(_menuFirstSelected);
     }
 }
 public void ShowEndGameMenu()
 {
     EndGameMenu.SetActive(true);
     _isEndMenuOpen     = true;
     _currentController = InputManager.GetController();
     Debug.Log(_currentController + " endMenu controller");
     if (_currentController == Controller.Playstation || _currentController == Controller.Xbox)
     {
         _eventSystem.SetSelectedGameObject(null);
         _eventSystem.SetSelectedGameObject(MenuFirstSelected);
     }
     else
     {
         Cursor.lockState = CursorLockMode.None;
         Cursor.visible   = true;
     }
 }
 private void OnControllerTypeChanged()
 {
     Inputs.Controller newController = InputManager.GetController();
     if (newController == Controller.Other)
     {
         _eventSystem.SetSelectedGameObject(null);
         _currentController = newController;
     }
     else
     {
         if (_currentMenu == Menus.InGame)
         {
             _eventSystem.SetSelectedGameObject(null);
             _eventSystem.SetSelectedGameObject(_menuFirstSelected);
         }
         else if (_currentMenu == Menus.Options)
         {
             _eventSystem.SetSelectedGameObject(null);
             _eventSystem.SetSelectedGameObject(_optionsFirstSelected);
         }
         _currentController = newController;
     }
 }
示例#6
0
        private void OnControllerTypeChanged()
        {
            Inputs.Controller newController = InputManager.GetController();

            Debug.Log("Controller type changed GeneralSystem");

            if (newController == Inputs.Controller.Playstation || newController == Inputs.Controller.Xbox)
            {
                if (mode == SurveillanceMode.Grid)
                {
                    _eventSystem.SetSelectedGameObject(null);
                    _eventSystem.SetSelectedGameObject(_fullScreenSystem.GetTarget().gameObject.GetComponentInChildren <OutlineButton>().gameObject);
                }
                else if (mode == SurveillanceMode.Focused)
                {
                    _eventSystem.SetSelectedGameObject(null);
                }
            }
            else
            {
                _eventSystem.SetSelectedGameObject(null);
            }
            _currentController = newController;
        }
示例#7
0
 private void Start()
 {
     _currentController = InputManager.GetController();
 }