예제 #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);
        }
예제 #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;
     }
 }
예제 #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);
        }
예제 #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;
            }
        }
예제 #5
0
 public void ShowScreenFade()
 {
     m_ScreenFade = CreateWindow(UIWindow_ScreenFade, FadeParent);
     m_ScreenFade.Show();
 }
예제 #6
0
파일: UIManager.cs 프로젝트: Hengle/Clicker
        void Button_ShowCraft_PressHandler()
        {
            UIWindow_Base wnd = WindowsManager.ShowWindow(WindowsManager.UIWindow_CraftPrefab);

            OnShowCraftWindow?.Invoke(wnd);
        }
예제 #7
0
 public UIWindow_Base ShowWindow(UIWindow_Base source)
 {
     return(WindowManager.ShowWindow(source));
 }