Пример #1
0
    private void advanceText()
    {
        currentDuration = 0;

        if (currentText != null)
        {
            if (currentText.callback != null)
            {
                currentText.callback();
            }
        }

        if (textQueue.Count > 0)
        {
            textBox.show();
            currentText = textQueue [0];
            textQueue.RemoveAt(0);
            textBox.text   = currentText.text;
            textBox.target = currentText.speaker;
        }
        else
        {
            reset();
        }
    }
Пример #2
0
    private void advanceText()
    {
        currentDuration = 0;

        if (currentText != null)
        {
            if (currentText.callback != null)
            {
                currentText.callback();
            }
        }

        if (textQueue.Count > 0)
        {
            if (textQueue[0].text.Length > 0)
            {
                sounds.player.PlayOneShot(sounds.textBubble, .2f);
                textBox.show();
            }
            currentText = textQueue [0];
            textQueue.RemoveAt(0);
            textBox.text = currentText.text;
            //	textBox.target = currentText.speaker;
        }
        else
        {
            reset();
        }
    }
Пример #3
0
    private void advanceText()
    {
        currentDuration = 0;

        if (currentText != null)
        {
            if (currentText.callback != null)
            {
                currentText.callback();
            }
        }

        if (textQueue.Count > 0)
        {
            if (textQueue[0].text.text.Length > 0)
            {
                textBox.show();
            }
            else
            {
                textBox.hide();
            }
            currentText = textQueue[0];
            textQueue.RemoveAt(0);
            textFinishedPlaying = false;
            textPlayer.PlayText(currentText.text, onTextPlayed);
            Sounds.PlayOneShot(Sounds.instance.advanceText, .4f);
        }
        else
        {
            reset();
        }
    }