Exemplo n.º 1
0
        public GameModelSetupInteractive GetCurrentGame()
        {
            Ray ray = _camera.ScreenPointToRay(new Vector3(Screen.width * 0.5f, Screen.height * 0.5f, 0f));

            if (Physics.Raycast(ray, out RaycastHit hitInfo, _raycastMaxDistance))
            {
                GameModelSetupInteractive gameFromRay = hitInfo.transform.GetComponent <GameModelSetupInteractive>();
                if (_currentGame != gameFromRay)
                {
                    _currentGame = gameFromRay;
                }
            }
Exemplo n.º 2
0
 public override void OnEnter()
 {
     _controls.InputEnabled    = false;
     _currentGame              = _interactions.GetCurrentGame();
     _currentGame.InputEnabled = true;
 }
Exemplo n.º 3
0
 public override void OnExit()
 {
     _currentGame.InputEnabled = false;
     _currentGame           = null;
     _controls.InputEnabled = true;
 }