Example #1
0
    // Update is called once per frame
    void Update()
    {
        float value = slider.GetValue();

        skyboxExposure = RenderSettings.skybox.GetFloat("_Exposure");
        RenderSettings.skybox.SetFloat("_Exposure", skyboxExposure * value);
        for (int i = 0; i < lights.Length; i++)
        {
            lights[i].intensity = lightIntensities[i] * value;
        }
        for (int i = 0; i < reflectionProbes.Length; i++)
        {
            reflectionProbes[i].intensity = reflectionProbesIntensities[i] * value;
        }
    }
Example #2
0
 private void Update()
 {
     messageSound.volume     = slider.GetValue();
     buttonClickSound.volume = slider.GetValue();
 }
Example #3
0
 /// <summary>
 /// Updates Roboy's rotation corresponding to the assigned slider's value,
 /// where the value 0-100 percent is mapped to 0-360 degree
 /// </summary>
 void Update()
 {
     this.transform.localEulerAngles = new Vector3(this.transform.localEulerAngles.x, slider.GetValue() * 360, this.transform.localEulerAngles.z);
 }
Example #4
0
 /// <summary>
 /// Update Volume value of the song according to the current slider value
 /// </summary>
 void Update()
 {
     song.volume = slider.GetValue();
 }