public PopUpViewer PopUp(Transform parent) { IUiPrefabs uiPrefabs = resourcesManager.Instance().UiPrefabs; PopUpViewer popUpViewer = resourcesManager.Instance().UiPrefabs.Popup(parent); popUpViewer.Initialization(uiPrefabs); PopUpModel popUpModel = new PopUpModel(); popUpModel.SubscribeToMenu(x => { managerUi.Instance().HideOpenPopup(); managerUi.Instance().SetActive(LayersTypes.Windows, UiConst.WINDOW_MAIN, true); }); popUpModel.SubscribeRepeat(x => { managerUi.Instance().HideOpenPopup(); managerGame.Instance().StartGame(); }); PopUpPresenter presenter = new PopUpPresenter(popUpViewer, popUpModel); return(popUpViewer); }
public PopUpViewer Popup(Transform parent) { PopUpViewer popUpViewer = Instantiate(_popUpViewer, parent); popUpViewer.name = UiConst.POPUP_TYPE1; return(popUpViewer); }