Exemple #1
0
        protected override void OnDisable()
        {
            PointerClickEventListener.Get(_tLowResolution.gameObject).onEvent    -= SetResolution;
            PointerClickEventListener.Get(_tNormalResolution.gameObject).onEvent -= SetResolution;
            PointerClickEventListener.Get(_tHighResolution.gameObject).onEvent   -= SetResolution;

            PointerClickEventListener.Get(_t30fps.gameObject).onEvent -= UpdateSetting;
            PointerClickEventListener.Get(_t60fps.gameObject).onEvent -= UpdateSetting;

            PointerClickEventListener.Get(_tLowQuality.gameObject).onEvent    -= UpdateSetting;
            PointerClickEventListener.Get(_tMiddleQuality.gameObject).onEvent -= UpdateSetting;
            PointerClickEventListener.Get(_tHighQuality.gameObject).onEvent   -= UpdateSetting;

            _btnClose.onClick.RemoveListener(Close);
        }
Exemple #2
0
        protected override void OnEnable()
        {
            PointerClickEventListener.Get(_tLowResolution.gameObject).onEvent    += SetResolution;
            PointerClickEventListener.Get(_tNormalResolution.gameObject).onEvent += SetResolution;
            PointerClickEventListener.Get(_tHighResolution.gameObject).onEvent   += SetResolution;

            PointerClickEventListener.Get(_t30fps.gameObject).onEvent += UpdateSetting;
            PointerClickEventListener.Get(_t60fps.gameObject).onEvent += UpdateSetting;

            PointerClickEventListener.Get(_tLowQuality.gameObject).onEvent    += UpdateSetting;
            PointerClickEventListener.Get(_tMiddleQuality.gameObject).onEvent += UpdateSetting;
            PointerClickEventListener.Get(_tHighQuality.gameObject).onEvent   += UpdateSetting;

            _btnClose.onClick.AddListener(Close);

            SyncUI();
            UpdateSetting(null);

            DefaultShowEffect();
        }