Exemplo n.º 1
0
 public void Initialization(IUiPrefabs prefabs)
 {
     Repeat = prefabs.ButtonDefault(_container);
     Repeat.gameObject.SetActive(true);
     ToMenu = prefabs.ButtonDefault(_container);
     ToMenu.gameObject.SetActive(true);
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public ILayer GetPopup(Transform parent)
        {
            IUiPrefabs    prefabs   = resourcesManager.Instance().UiPrefabs;
            RectTransform container = prefabs.Container(parent, UiConst.CONTAINER_POPUP);

            container.gameObject.SetActive(true);
            Layer <IComponent> popup = new Layer <IComponent>(LayersTypes.PopUp);

            popup.Add(UiConst.POPUP_TYPE1, _popUpFactory.PopUp(container));

            return(popup);
        }
Exemplo n.º 4
0
        public ILayer GetWindows(Transform parent)
        {
            IUiPrefabs    prefabs   = resourcesManager.Instance().UiPrefabs;
            RectTransform container = prefabs.Container(parent, UiConst.CONTAINER_WINDOW);

            container.gameObject.SetActive(true);
            Layer <IComponent> windows = new Layer <IComponent>(LayersTypes.Windows);

            windows.Add(UiConst.WINDOW_MAIN, _windowFactory.Menu(container));

            return(windows);
        }
Exemplo n.º 5
0
        public MenuViewer Menu(Transform parent)
        {
            IUiPrefabs uiPrefabs  = resourcesManager.Instance().UiPrefabs;
            MenuViewer menuViewer = uiPrefabs.Menu(parent);

            menuViewer.Initialization(uiPrefabs);

            MenuModel menuModel = new MenuModel();

            menuModel.SubscribeStart(x =>
            {
                managerUi.Instance().HideOpenWindows();
                managerGame.Instance().StartGame();
            });

            MenuPresenter presenter = new MenuPresenter(menuViewer, menuModel);

            return(menuViewer);
        }
Exemplo n.º 6
0
 public void Initialization(IUiPrefabs prefabs)
 {
     ButtonStart = prefabs.ButtonDefault(_content);
     ButtonStart.gameObject.SetActive(true);
 }