public UIWindow GetWindow(UIWindow.WindowType type) { foreach (UIWindow window in Windows) { if (window.Type == type) { return(window); } } throw new Exception("There is no window of type = " + type); }
public void OpenWindow(UIWindow.WindowType type) { _openedWindow = GetWindow(type); _openedWindow.OnOpen(); Background.SetActive(true); }