Exemplo n.º 1
0
        public void EnableTacticalCameraTriggers()
        {
            if (AreTacticalCameraTriggersEnabled)
            {
                throw new InvalidOperationException("Tactical camera is already running.");
            }

            AreTacticalCameraTriggersEnabled = true;
            if (_tacticalCameraSettings.UnlimitedZoomEnabled)
            {
                _gameValueService.EnableUnlimitedZoom();
            }
            _gameValueService.DisableFreeCamera();
            _gameValueService.EnableZoom();
            _gameValueService.EnableCollisionZoomAdjustment();
            _gameValueService.EnableAutoCameraAngleAdjustment();
            _gameValueService.EnableCenteringCameraBehindCharacter();
            _gameValueService.SetCameraZoomDistance(0);

            _keyHandler = _tacticalCameraKeyHandlerFactory.CreateTacticalCameraKeyHandler(_gameValueService, _tacticalCameraSettings, _gameProcess);

            _userInputHandler = _userInputHandlerFactory.CreateUserInputHandler
                                (
                _keyHandler,
                _gameValueService
                                );

            _userInputHandler.StartProcessingInputEvents();
        }
Exemplo n.º 2
0
        public void DisableTacticalCamera()
        {
            if (!IsTacticalCameraEnabled)
            {
                return;
            }

            _gameValueService.SetCameraZoomDistance(0);
            _gameValueService.DisableFreeCamera();
            _gameValueService.EnableAutoCameraAngleAdjustment();
            _gameValueService.EnableCollisionZoomAdjustment();
            _gameValueService.EnableZoom();
            _gameValueService.EnableCenteringCameraBehindCharacter();
            IsTacticalCameraEnabled = false;
            OnTacticalCameraStateChanged(false);
        }