Пример #1
0
 public void StartScreen()
 {
     if (!m_StartScreen && screens.Length > 0)
     {
         m_StartScreen = screens[0];
         //Debug.Log("Start Group now is: " + m_StartScreen.gameObject.name);
     }
     currentScreen = m_StartScreen;
     StartScreen(m_StartScreen);
 }
Пример #2
0
 public void ShowButtonsOnEnable(UI_Screen previous, UI_Screen current)
 {
     if (current.name.Equals("Questions"))
     {
         //Debug.Log("Buttons To be Enabled");
         deleteQuestion.gameObject.SetActive(true);
         //Debug.Log("Delete");
         modifyQuestion.gameObject.SetActive(true);
         //Debug.Log("Modify");
         createQuestion.gameObject.SetActive(true);
         //Debug.Log("Create");
         Debug.Log("Buttons Enabled");
         MenuEvents.screenChange.RemoveListener(ShowButtonsOnEnable);
     }
 }
Пример #3
0
        public void SwitchScreen(UI_Screen aScreen)
        {
            if (aScreen && currentScreen != aScreen)
            {
                if (currentScreen)
                {
                    //Debug.Log(gameObject.name + ": Switching group " + currentScreen.gameObject.name + " to " + "<color=#" + ColorUtility.ToHtmlStringRGB(Color.yellow) + ">" + aScreen.gameObject.name + "</color>");
                    //CloseScreen(currentScreen);
                    previousScreen = currentScreen;
                }

                currentScreen = aScreen;
                //StartScreen(aScreen); handled by animation
                if (MenuEvents.screenChange != null)
                {
                    MenuEvents.screenChange.Invoke(previousScreen, currentScreen);
                }
            }
        }
Пример #4
0
 public void CloseScreen(UI_Screen aScreen)
 {
     aScreen.gameObject.SetActive(false);
 }
Пример #5
0
 public void StartScreen(UI_Screen aScreen)
 {
     aScreen.gameObject.SetActive(true);
     aScreen.transform.SetAsLastSibling();
 }