Пример #1
0
    public void DisplayNextText()
    {
        if (subDialogues.Count == 0)
        {
            EndDialogue();
            return;
        }

        Dialogue.SubDialogue subDialogue = subDialogues.Dequeue();
        uiText.fontSize = subDialogue.fontSize;
        uiText.color    = subDialogue.color;
        if (co != null)
        {
            StopCoroutine(co);
        }
        co = StartCoroutine(ScrollCharacters(subDialogue.text, subDialogue.emphasis));
    }
Пример #2
0
    public void DisplayNextText()
    {
        canContinue = false;
        buttonPrompt.SetActive(false);
        if (subDialogues.Count == 0)
        {
            EndDialogue();
            return;
        }

        Dialogue.SubDialogue subDialogue = subDialogues.Dequeue();
        uiText.fontSize = subDialogue.fontSize == 0 ? defaultFontSize : subDialogue.fontSize;
        switch (subDialogue.profileLocation)
        {
        case Dialogue.ProfileLocation.Left:
            uiText.color     = leftProfileColor;
            uiText.fontStyle = FontStyles.Normal;
            leftProfile.gameObject.SetActive(true);
            rightProfile.gameObject.SetActive(false);
            break;

        case Dialogue.ProfileLocation.Right:
            uiText.color     = rightProfileColor;
            uiText.fontStyle = FontStyles.Normal;
            leftProfile.gameObject.SetActive(false);
            rightProfile.gameObject.SetActive(true);
            break;

        case Dialogue.ProfileLocation.None:
            uiText.color     = noProfileColor;
            uiText.fontStyle = FontStyles.Italic;
            leftProfile.gameObject.SetActive(false);
            rightProfile.gameObject.SetActive(false);
            break;
        }
        if (co != null)
        {
            StopCoroutine(co);
        }
        co = StartCoroutine(ScrollCharacters(subDialogue.text, subDialogue.textSpeed <= 0 ? defaultSpeed : subDialogue.textSpeed));
    }