예제 #1
0
    public void UpdateValues()
    {
        var type = ScalerDataUtils.GetCurrentScalerType();
        CameraScalerData currentData = data.Value[type];

        if (currentData.useFov)
        {
            DOVirtual.Float(
                virtualCamera.m_Lens.FieldOfView,
                currentData.fov,
                transitionDuration,
                newValue => virtualCamera.m_Lens.FieldOfView = newValue).SetEase(Ease.InCirc);
        }
        if (currentData.usePosition)
        {
            if (useLocalPosition)
            {
                transform.DOLocalMove(currentData.offsetPosition, transitionDuration).SetEase(Ease.InCirc);
            }
            else
            {
                DOTween.To(
                    () => cinemachineTransposer.m_FollowOffset,
                    offset => cinemachineTransposer.m_FollowOffset = offset,
                    currentData.offsetPosition,
                    transitionDuration).SetEase(Ease.InCirc);
            }
        }
    }
예제 #2
0
    public void UpdateValues()
    {
        float currentData = data.Value[ScalerDataUtils.GetCurrentScalerType()];

        canvasScaler.matchWidthOrHeight = currentData;
    }
예제 #3
0
 public float GetCurrentValue()
 {
     return(Value[ScalerDataUtils.GetCurrentScalerType()]);
 }