public void OnSettingsChanged()
    {
        var musicOn = SettingKeys.IsEnabled(SettingKeys.MusicOn);

        musicController.enabled = musicOn;

        var soundOn = SettingKeys.IsEnabled(SettingKeys.SoundOn);

        audioListener.enabled = soundOn;

        var effectsOn = SettingKeys.IsEnabled(SettingKeys.PostEffectOn);

        postProcessing.enabled = effectsOn;
    }
Exemplo n.º 2
0
 void Start()
 {
     musicToggle.isOn = SettingKeys.IsEnabled(SettingKeys.MusicOn);
     soundToggle.isOn = SettingKeys.IsEnabled(SettingKeys.SoundOn);
     postToggle.isOn  = SettingKeys.IsEnabled(SettingKeys.PostEffectOn);
 }