Ejemplo n.º 1
0
        UIWindow_Base CreateWindow(UIWindow_Base source, RectTransform parent)
        {
            UIWindow_Base wnd        = Instantiate(source);
            RectTransform rTransform = wnd.GetComponent <RectTransform>();

            rTransform.SetParent(parent, false);

            return(wnd);
        }
Ejemplo n.º 2
0
 void Button_Windows_PressHandler()
 {
     if (m_Window == null)
     {
         m_Window = m_WindowManager.ShowWindow(Window_Example_Prefab);
     }
     else
     {
         m_Window.Hide();
         m_Window = null;
     }
 }
Ejemplo n.º 3
0
        public UIWindow_Base ShowWindow(UIWindow_Base source)
        {
            if (m_WindowQueue.Count == 0)
            {
                ShowScreenFade();
            }

            UIWindow_Base wnd = CreateWindow(source, WindowParent);

            m_WindowQueue.Push(wnd);

            wnd.OnWindowClose += WindowCloseHandler;
            wnd.Show();

            return(wnd);
        }
Ejemplo n.º 4
0
        void ShowCraftWindow_Handler(UIWindow_Base wnd)
        {
            Debug.Log("ShowCraftWindow_Handler: state " + m_State);

            switch (m_State)
            {
            case GameStates.Level:
                TimeMultiplayerController.StartChangeMultiplayer(m_LEVEL_TIME_MULTIPLAYER);

                wnd.OnUIHided += () =>
                {
                    TimeMultiplayerController.StartResetingMultiplayer();
                };
                break;
            }
        }
Ejemplo n.º 5
0
 public void ShowScreenFade()
 {
     m_ScreenFade = CreateWindow(UIWindow_ScreenFade, FadeParent);
     m_ScreenFade.Show();
 }
Ejemplo n.º 6
0
        void Button_ShowCraft_PressHandler()
        {
            UIWindow_Base wnd = WindowsManager.ShowWindow(WindowsManager.UIWindow_CraftPrefab);

            OnShowCraftWindow?.Invoke(wnd);
        }
Ejemplo n.º 7
0
 public UIWindow_Base ShowWindow(UIWindow_Base source)
 {
     return(WindowManager.ShowWindow(source));
 }