Beispiel #1
0
        private void Start()
        {
            _btnNotifications.onClick.AddListener(() => { OnClickNotifications?.Invoke(); });
            _btnChangePhone.onClick.AddListener(() => { OnClickChangePhone?.Invoke(); });
            _btnStorage.onClick.AddListener(() => { OnClickStorage?.Invoke(); });
            _btnPrivacy.onClick.AddListener(() => { OnClickPrivacy?.Invoke(); });
            _btnLogOut.onClick.AddListener(() => { OnClickLogOut?.Invoke(); });

            _tglTheme.onValueChanged.AddListener((value) =>
            {
                if (value)
                {
                    PlayerPrefs.SetString(PrefsKeys.Theme, "light");
                    PlayerPrefs.Save();
                }
                else
                {
                    PlayerPrefs.SetString(PrefsKeys.Theme, "dark");
                    PlayerPrefs.Save();
                }
            });
        }
Beispiel #2
0
 private void SettingPanelOnClickLogOut()
 {
     OnClickLogOut?.Invoke();
 }