Exemple #1
0
 private void OnEnable()
 {
     _timeController.DisplayTimer(false);
     if (PlayerPrefs.HasKey(LWConfig.HasSound))
     {
         var on = PlayerPrefs.GetInt(LWConfig.HasSound);
         if (on == 1)
         {
             _soundButton.SetActive(true);
             _hasAudio = true;
         }
         else
         {
             _soundButton.SetActive(false);
             _hasNotification = false;
         }
     }
     if (PlayerPrefs.HasKey(LWConfig.HasNotification))
     {
         var on = PlayerPrefs.GetInt(LWConfig.HasNotification);
         if (on == 1)
         {
             _notificationButton.SetActive(true);
             _hasNotification = true;
         }
         else
         {
             _notificationButton.SetActive(false);
             _hasNotification = true;
         }
     }
     if (PlayerPrefs.HasKey(LWConfig.Timer))
     {
         _timerText.text = PlayerPrefs.GetString(LWConfig.Timer);
     }
 }