Пример #1
0
    public void Zoom(InputAction.CallbackContext context)
    {
        var amount = context.ReadValue <Vector2>().normalized.y;

        _cameraManipulator.ChangeHeightBy(amount * ZoomSpeed);
        if (_cameraTransform.localPosition.z > MaxCameraHeight)
        {
            _cameraManipulator.SetHeightTo(MaxCameraHeight);
        }
    }
    public void Zoom(InputAction.CallbackContext context)
    {
        var amount = context.ReadValue <Vector2>().normalized.y;

        _cameraManipulator.ChangeHeightBy(amount * ZoomSpeed);
        if (_cameraTransform.localPosition.z < MinCameraHeight)
        {
            _cameraManipulator.SetHeightTo(MinCameraHeight);
        }
        else if (_cameraTransform.localPosition.z > ModeTransitionHeight)
        {
            GameState.Get.ChangeModeToInterplanetary();
        }
    }