示例#1
0
    public void Accept(AudioMixer mixer, PostProcessProfile postProcessProfile)
    {
        Screen.SetResolution(Resolution.width, Resolution.height, FullScreenMode, Resolution.refreshRate);
        QualitySettings.SetQualityLevel((int)Quality);
        QualitySettings.vSyncCount = Convert.ToInt32(VSync);

        if (postProcessProfile != null)
        {
            postProcessProfile.TryGetSettings(out bloom);
            postProcessProfile.TryGetSettings(out chromaticAberration);

            bloom.fastMode.value = FastMode;
            chromaticAberration.fastMode.value = FastMode;
        }

        if (mixer != null)
        {
            AudioSettings.SetVolume(mixer, MasterVolume, "masterVolume");
            AudioSettings.SetVolume(mixer, MusicVolume, "musicVolume");
            AudioSettings.SetVolume(mixer, SfxVolume, "sfxVolume");
        }
    }
示例#2
0
 public void SetMusicVolume(float value)
 {
     AudioSettings.SetVolume(mixer, value, "musicVol");
 }
示例#3
0
 public void SetSFXVolume(float value)
 {
     AudioSettings.SetVolume(mixer, value, "sfxVol");
 }
示例#4
0
 public void SetMasterVolume(float value)
 {
     AudioSettings.SetVolume(mixer, value, "masterVol");
 }