/// <summary>
        /// It is to set "Spelling" text value to TextMesh pro and Highlighter Text after replacing "Missing Letters" with "_".
        /// </summary>
        /// <param name="data"></param>
        public void SetText(FillInTheBlanksModel data)
        {
            this.spellingData = data;

            string spelling = SplitSpelling(spellingData.spelling, spellingData.missingLettersPosition);

            if (FillInTheBlanksManager.Instance.gameMode == GameMode.Simple)
            {
                textSpelling.fontSize = FillInTheBlanksManager.Instance.fontSizeSimpleMode;
                textSpelling.text     = spellingData.spelling + " - " + spelling;
            }
            else
            {
                textSpelling.fontSize = FillInTheBlanksManager.Instance.fotSizeAdvancedMode;
                textSpelling.text     = spelling;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// It is to set "Missing Letter" text value to TextMesh pro and Highlighter Text.
        /// </summary>
        /// <param name="data"></param>
        public void SetText(FillInTheBlanksModel data, FillInTheBlanksData controller, Action <bool> resultAction)
        {
            fillInTheBlanksController      = controller;
            controller.OnSpellingSelected += OnSpellingSelected;

            string option = SplitSpelling(data.spelling, data.missingLettersPosition);

            this.resultAction   = resultAction;
            data.missingLetters = option;
            textOption.text     = option;

            if (FillInTheBlanksManager.Instance.gameMode == GameMode.Simple)
            {
                textOption.fontSize = FillInTheBlanksManager.Instance.fontSizeSimpleMode;
            }
            else
            {
                textOption.fontSize = FillInTheBlanksManager.Instance.fotSizeAdvancedMode;
            }

            OnSelect();
        }