Example #1
0
    void SetWrongPronoun()
    {
        string wrongPronoun = PronounValues.GetWrongPronouns1() [0];

        pronoun.GetComponentInChildren <TMPro.TextMeshProUGUI> ().text = wrongPronoun;
    }
Example #2
0
 private void SetCorrectPronoun()
 {
     correctPronoun = PronounValues.GetRightPronoun2();
 }
Example #3
0
    public void Interrupt()
    {
        if (OnInterruption != null)
        {
            OnInterruption();
        }
        //TODO put this in CopyFormatter
        string     formattedInterruption = SpeechCopy.interruption.Replace("(rightPronoun1)", PronounValues.GetRightPronoun1()).Replace("(rightPronoun2)", PronounValues.GetRightPronoun2());
        GameObject interrupt             = Instantiate(interruption);

        interrupt.GetComponentInChildren <TMPro.TextMeshProUGUI> ().text = formattedInterruption;
        interrupt.transform.SetParent(gameObject.transform, false);
        interrupt.transform.SetSiblingIndex(interruptIndex);

        GameObject apology = Instantiate(speechBubble);

        apology.GetComponent <Image> ().sprite = apologySprite;
        apology.GetComponentInChildren <TMPro.TextMeshProUGUI> ().text = SpeechCopy.apologies[0];
        apology.transform.SetParent(gameObject.transform, false);
        apology.transform.SetSiblingIndex(interruptIndex + 1);
        SetHeightOfSpeechBubble(apology.transform);

        ++interruptCount;

        bool interruptionComplete = interruptCount >= 3;

        if (interruptionComplete)
        {
            CorrectAllPronouns();
        }

        StartCoroutine(StopScroll(interruptionComplete));
    }