Ejemplo n.º 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);
            }
        }
    }
Ejemplo n.º 2
0
    public void UpdateValues()
    {
        float currentData = data.Value[ScalerDataUtils.GetCurrentScalerType()];

        canvasScaler.matchWidthOrHeight = currentData;
    }
Ejemplo n.º 3
0
 public float GetCurrentValue()
 {
     return(Value[ScalerDataUtils.GetCurrentScalerType()]);
 }