private void OnPopupClose(PopupEvents.ClosePopupEvent e) { if (View == null) { InstantiateView(); } View.GetComponent <PopupView>().ClosePopup(); }
protected virtual void OnPopupClose(PopupEvents.ClosePopupEvent e) { if (View == null) { return; } View.GetComponent <PopupView>().ClosePopup(); }
protected override void OnPopupClose(PopupEvents.ClosePopupEvent e) { if (_gridModel.SelectedUnit != null) { _gridModel.SelectedUnit.Selected = false; _gridModel.SelectedUnit = null; } View.GetComponent <PopupView>().ClosePopup(); }
private void Start() { var e = new PopupEvents.ClosePopupEvent(); CloseButton.onClick.AddListener(delegate { EventSystem.instance.Dispatch(e); }); BgCloseButton.onClick.AddListener(delegate { EventSystem.instance.Dispatch(e); }); }
protected void Start() { var e = new PopupEvents.ClosePopupEvent(); if (CloseButton != null) { CloseButton.onClick.AddListener(delegate { EventSystem.instance.Dispatch(e); }); } BgCloseButton.onClick.AddListener(delegate { EventSystem.instance.Dispatch(e); }); }