private void HandleOnToggleSFX(Parameters p) { bool isOn = p.GetBoolExtra("on", true); if (isOn) { GameSystems.GetService <IAudioHandler>().UnmuteSFX(); } else { GameSystems.GetService <IAudioHandler>().MuteSFX(); } }
void Awake() { GameSystems.Register(typeof(IAudioHandler), this); sfxDefaultVolume = sfxSource.volume; }