Example #1
0
 private void OnNotification(SettingNotificationEvent evt)
 {
     notificationEnabled = evt.value;
     Debug.Log("OnNotification:" + evt.value);
 }
Example #2
0
    public void Load()
    {
        MusicEnabled        = LocalStorage.GetBool("MusicEnabled", musicEnabled);
        SoundEnabled        = LocalStorage.GetBool("SoundEnabled", soundEnabled);
        NotificationEnabled = LocalStorage.GetBool("NotificationEnabled", notificationEnabled);

        EventManager.Instance.DefineProperty <SettingMusicEvent>(() => { return(SettingMusicEvent.Create(musicEnabled)); });
        EventManager.Instance.DefineProperty <SettingSoundEvent>(() => { return(SettingSoundEvent.Create(soundEnabled)); });
        EventManager.Instance.DefineProperty <SettingNotificationEvent>(() => { return(SettingNotificationEvent.Create(notificationEnabled)); });
    }