public void ShowMessage(string messageToShow, Action yesButtonCallBack, Action noButtonCallBack, string yesButtonText = "Yes", string noButtonText = "No") { if (!IsScreenActive(InGameScreens.Message)) { InGameActiveScreens mainMenuScreen = new InGameActiveScreens(); mainMenuScreen.screenName = InGameScreens.Message; mainMenuScreen.screenLayer = GetScreenLayer(InGameScreens.Message); GameObject gm = Instantiate(screens[(int)InGameScreens.Message], screenLayers[(int)mainMenuScreen.screenLayer]) as GameObject; mainMenuScreen.screenObject = gm; inGameActiveScreens.Add(mainMenuScreen); gm.GetComponent <MessageScript>().ShowDoubleButtonPopUp(messageToShow, yesButtonCallBack, noButtonCallBack, yesButtonText, noButtonText); } }
public void ShowMessage(string messageToShow, Action callBackMethod = null, string okButtonText = "Ok") { if (!IsScreenActive(InGameScreens.Message)) { InGameActiveScreens mainMenuScreen = new InGameActiveScreens(); mainMenuScreen.screenName = InGameScreens.Message; mainMenuScreen.screenLayer = GetScreenLayer(InGameScreens.Message); GameObject gm = Instantiate(screens[(int)InGameScreens.Message], screenLayers[(int)mainMenuScreen.screenLayer]) as GameObject; mainMenuScreen.screenObject = gm; inGameActiveScreens.Add(mainMenuScreen); gm.GetComponent <MessageScript>().ShowSingleButtonPopUp(messageToShow, callBackMethod, okButtonText); } }
public void ShowScreen(InGameScreens screenName, object[] parameter = null) { int layer = (int)GetScreenLayer(screenName); for (int i = layer + 1; i < screenLayers.Length; i++) { DestroyScreen((ScreenLayer)i); } if (!IsScreenActive(screenName)) { DestroyScreen(GetScreenLayer(screenName)); InGameActiveScreens mainMenuScreen = new InGameActiveScreens(); mainMenuScreen.screenName = screenName; mainMenuScreen.screenLayer = GetScreenLayer(screenName); GameObject gm = Instantiate(screens[(int)screenName], screenLayers[(int)mainMenuScreen.screenLayer]) as GameObject; mainMenuScreen.screenObject = gm; inGameActiveScreens.Add(mainMenuScreen); switch (screenName) { case InGameScreens.TopUp: { gm.GetComponent <TopUpScript>().Init((float)parameter[0]); } break; case InGameScreens.EmojiScreen: { gm.GetComponent <EmojiUIScreenManager>().containerVal = emojiContainerVal; } break; default: break; } } }