Exemplo n.º 1
0
        public void CloseCurrentScreen()
        {
            if (currentScreen)
            {
                currentScreen.CloseScreen();
                currentScreen  = null;
                previousScreen = currentScreen;
            }

            if (onCloseCurrentScreen != null)
            {
                onCloseCurrentScreen.Invoke();
            }
        }
Exemplo n.º 2
0
        public void SwitchScreens(ZHG_UI_Screen aScreen)
        {
            if (aScreen)
            {
                if (currentScreen)
                {
                    currentScreen.CloseScreen();
                    previousScreen = currentScreen;
                }

                currentScreen = aScreen;
                currentScreen.gameObject.SetActive(true);
                currentScreen.StartScreen();
            }

            if (onSwitchedScreen != null)
            {
                onSwitchedScreen.Invoke();
            }
        }