Esempio n. 1
0
        private void ShowDiscardCardWindow(HudBase Hud, Window Prefab)
        {
            DiscardCardWindow window = Hud.InstantiateWindow(Prefab) as DiscardCardWindow;

            window.OnWindowClosed = () => OnDiscardWindowClosed?.Invoke();
            OnDiscardWindowOpened?.Invoke();
        }
Esempio n. 2
0
        public void OpenWindow <T>(HudBase Hud)
        {
            foreach (var prefab in WindowsContainer.Get().WindowPrefabs)
            {
                if (prefab.GetType() == typeof(T))
                {
                    if (typeof(T) == typeof(DiscardCardWindow))
                    {
                        ShowDiscardCardWindow(Hud, prefab);
                    }
                    else
                    {
                        Hud.InstantiateWindow(prefab);
                    }

                    return;
                }
            }
        }