Exemplo n.º 1
0
        private void ChangeQualityLevel(UIGenericSlider slider, float newValue)
        {
            var quality = (int)newValue;

            QualitySettings.SetQualityLevel(quality);
            QualitySettings.shadowDistance = _shadowDist[quality];
            QualitySettings.lodBias        = _lodBias[quality];
            slider.SetText(QualitySettings.names[quality]);
        }
Exemplo n.º 2
0
        private void UpdateShadowCascades(UIGenericSlider slider, float cascades)
        {
            var c = Mathf.RoundToInt(cascades);

            if (c == 1)
            {
                c = 2;
            }
            else if (c == 3)
            {
                c = 4;
            }
            QualitySettings.shadowCascades = c;
        }
Exemplo n.º 3
0
 private void UpdateShadowDistance(UIGenericSlider slider, float dist)
 {
     QualitySettings.shadowDistance = dist;
 }
Exemplo n.º 4
0
 private void ChangeFov(UIGenericSlider slider, float newValue)
 {
     Player.Cam.fieldOfView = newValue;
 }
Exemplo n.º 5
0
 private void UpdateVolume(UIGenericSlider slider, float newValue)
 {
     AudioListener.volume = newValue;
     slider.SetText(AudioListener.volume.ToString("F1"));
 }