예제 #1
0
        private void Start()
        {
            _button    = GetComponent <Button>();
            _lswButton = GetComponent <LSWButton>();
            _button.onClick.AddListener(ToggleMenuState);
            _popupMenu = menu.GetComponent <IUiPopup>();

            GamePauseHandler.SubscribeCloseEvent(EscCloseEvent);
        }
예제 #2
0
 public void buttonSetup(bool status)
 {
     button = gameObject.GetComponent <LSWButton>();
     if (button == null)
     {
         return;
     }
     if (status)
     {
         button.ChangeHighlight(button._pressedColor);
         button.enabled = false;
     }
     else
     {
         button.enabled = true;
         button.ChangeHighlight(button._normalColor);
     }
 }
예제 #3
0
        private void Awake()
        {
            if (pausePopup != null)
            {
                _popupMenu = pausePopup.GetComponent <IUiPopup>();
                _popupMenu.OnHide.AddListener(Clock.Unpause);
            }
            else
            {
                Debug.LogError("Pause popup not found. Pausing disabled.");
                return;
            }

            if (triggerButton != null)
            {
                triggerButton.onClick.AddListener(TryPause);
            }

            _lswButton = GetComponent <LSWButton>();
        }