示例#1
0
    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();
    }
示例#2
0
    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);
        }
    }
示例#3
0
 public void Setup(TextInTurnsGame currentTextInCard)
 {
     currentTextOfError = currentTextInCard;
     ClearToggles();
 }
示例#4
0
 public void OpenErrorMenu(TextInTurnsGame currentTextInCard)
 {
     Debug.Log("Opening ErrorMenu");
     Show(errorsMenu);
     errorsMenuController.Setup(currentTextInCard);
 }