UIWindow_Base CreateWindow(UIWindow_Base source, RectTransform parent) { UIWindow_Base wnd = Instantiate(source); RectTransform rTransform = wnd.GetComponent <RectTransform>(); rTransform.SetParent(parent, false); return(wnd); }
void Button_Windows_PressHandler() { if (m_Window == null) { m_Window = m_WindowManager.ShowWindow(Window_Example_Prefab); } else { m_Window.Hide(); m_Window = null; } }
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); }
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; } }
public void ShowScreenFade() { m_ScreenFade = CreateWindow(UIWindow_ScreenFade, FadeParent); m_ScreenFade.Show(); }
void Button_ShowCraft_PressHandler() { UIWindow_Base wnd = WindowsManager.ShowWindow(WindowsManager.UIWindow_CraftPrefab); OnShowCraftWindow?.Invoke(wnd); }
public UIWindow_Base ShowWindow(UIWindow_Base source) { return(WindowManager.ShowWindow(source)); }