protected void SetupTextInCard(TextInTurnsGame textInCard) { if (textInCard == null) { Debug.LogError("The obtained text for the card is null.", gameObject); return; } else if (textInCard.localizedText == null) { Debug.LogError("The text for the card does not have a localized text.", gameObject); return; } Debug.Log("Setting text in card: " + textInCard.localizedText + ".\nFrom the localization file: '" + textInCard.localizationFile + "' after a search for a text with NaughtyLevel = " + GameManager.instance.dataManager.naughtyLevel); sentenceText.Localize(textInCard.localizedText.id, textInCard.localizationFile); likeButton.SetToInitialState(); if (IsCurrentTextLiked()) { likeButton.Switch(); } currentTextInCard = textInCard; SetBackButtonAvaliability(); }
public override void NextButton() { gm.dataManager.SetTurnForNextEnabledPlayer(); TextInTurnsGame nextText = GetNextText(true); SetupTextInCard(nextText); if (section.topBar) { GameManager.instance.generalUi.sectionTitleLocalizer.Localize(nextText.localizationFile.ToString()); } else { Debug.LogWarning("The top bar in the UI should be enabled for the 'Mix mode' section: " + section, gameObject); } }
public void Setup(TextInTurnsGame currentTextInCard) { currentTextOfError = currentTextInCard; ClearToggles(); }
public void OpenErrorMenu(TextInTurnsGame currentTextInCard) { Debug.Log("Opening ErrorMenu"); Show(errorsMenu); errorsMenuController.Setup(currentTextInCard); }