Exemplo n.º 1
0
    private void SetDisplaySentenceIndex(int newValue)
    {
        displaySentenceIndex = newValue;

        Sentence current = GetSentence(displaySentenceIndex);
        Sentence next    = GetSentence(displaySentenceIndex + 1);

        // Update the UI
        playerUiController.DisplaySentence(current);
        UpdateLyricsDisplayer(current, next);
    }
Exemplo n.º 2
0
    private void UpdateSentences(int currentSentenceIndex)
    {
        Sentence lastSentence = CurrentSentence;

        CurrentSentence = GetSentence(currentSentenceIndex);
        NextSentence    = GetSentence(currentSentenceIndex + 1);

        if (lastSentence != CurrentSentence && CurrentSentence == null)
        {
            Debug.Log("Finished last sentence");
        }
        if (lastSentence == null && CurrentSentence == null)
        {
            Debug.Log("Song contains no sentences");
        }

        // Update the UI
        playerUiController.DisplaySentence(CurrentSentence);
        UpdateLyricsDisplayer();
    }