private void HandleMusicPressed() { var options = Pix.Game.GetInstance().Options; options.ToggleMusic(); m_view.SetMusicEnabled(options.IsMusicEnabled()); }
public void Init(OptionsView view, Fade fade, bool duringLevel) { m_view = view; m_fade = fade; var options = Pix.Game.GetInstance().Options; m_view.BackPressed += HandleBackPressed; m_view.SoundPressed += HandleSoundPressed; m_view.MusicPressed += HandleMusicPressed; m_view.RestorePurchasesPressed += HandleRestorePurchasesPressed; m_view.GPGSPressed += HandleGPGSPressed; m_view.SetVersion(Application.version); m_view.SetSoundEnabled(options.IsSoundEnabled()); m_view.SetMusicEnabled(options.IsMusicEnabled()); bool restorePurchaseAvailable = !duringLevel && Pix.Game.GetInstance().Purchaser.IsRestoreAvailable(); m_view.SetRestorePurchasesEnabled(restorePurchaseAvailable); UpdateSocial(); }