Example #1
0
        private void Init(IAudioSettingsController audioSettingsController)
        {
            _audioSettingsController = audioSettingsController;

            audioPanel.SetValue(_audioSettingsController.AudioVolume);
            audioPanel.SetValue(_audioSettingsController.MusicVolume);

            audioPanel.OnValueChange += (value) => audioSettingsController.AudioVolume = value;
            audioPanel.OnMute        += muted => audioSettingsController.AudioMuted = muted;

            musicPanel.OnValueChange += (value) => audioSettingsController.MusicVolume = value;
            musicPanel.OnMute        += muted => audioSettingsController.MusicMuted = muted;
        }
Example #2
0
 public OptionsMenuController(IAudioSettingsController audioSettingsController)
 {
     _audioSettingsController = audioSettingsController;
 }