private void OnContinueClicked() { if (!isActive) { return; } // Add it to the title game object GameObject MainMenu = GameObject.Find(GameConstants.UI_MAIN_MENU); GameObject loadFileScreen = UIFactory.CreateScreen(UIFactory.SCR_LOAD_FILE, MainMenu); ScreenQueueManager sqm = ScreenQueueManager.GetInstance(); sqm.ShowScreenNow(loadFileScreen); sqm.QueueScreenAsNext(this.gameObject); }
protected override void OnClicked() { Debug.Log("Save File Button Clicked"); GameObject MainMenu = GameObject.Find(GameConstants.UI_MAIN_MENU); ConfirmScreen screenComp = UIFactory.CreateScreenAndAddComponent <ConfirmScreen>(UIFactory.SCR_CONFIRM, MainMenu); ScreenQueueManager sqm = ScreenQueueManager.GetInstance(); sqm.ShowScreenNow(screenComp.gameObject); sqm.QueueScreenAsNext(parentScreen); screenComp.SetData(UIConstants.SAVE_FILE_TITLE, UIConstants.SAVE_FILE_DESC, OnYes, OnNo); SoundEffectController.GetInstance().PlaySound(GameConstants.SND_BUTTON); }
private void OnNewGameClicked() { if (!isActive) { return; } // Add it to the title game object GameObject MainMenu = GameObject.Find(GameConstants.UI_MAIN_MENU); ConfirmScreen confirmScreen = UIFactory.CreateScreenAndAddComponent <ConfirmScreen>(UIFactory.SCR_CONFIRM, MainMenu); confirmScreen.SetData(UIConstants.NEW_GAME_TITLE, UIConstants.NEW_GAME_DESC, StartNewGame, null); ScreenQueueManager sqm = ScreenQueueManager.GetInstance(); sqm.ShowScreenNow(confirmScreen.gameObject); sqm.QueueScreenAsNext(this.gameObject); }
/// <summary> /// Begins a conversation and opens up the ConversationScreen. /// </summary> public void StartConversation() { if (currConv == null) { Debug.LogError("Cannot start a conversation if one was not loaded."); return; } Debug.Log("Start Conversation: " + currConv.uid); GameObject MainMenu = GameObject.Find(GameConstants.UI_MAIN_MENU); GameObject convScreenObj = UIFactory.CreateScreen(UIFactory.SCR_CONVERSATION, MainMenu); currNode = currConv.nodeMap[currConv.startNodeTitle]; // Set the node to be displayed upon loading to the starting node ApplyParamModifiers(currNode); ScreenQueueManager sqm = ScreenQueueManager.GetInstance(); sqm.ShowScreenNow(convScreenObj); }