예제 #1
0
    private void OnSentenceEnded()
    {
        List <RecordedNote> recordedNotes  = PlayerNoteRecorder.GetRecordedNotes(CurrentSentence);
        SentenceRating      sentenceRating = PlayerScoreController.CalculateScoreForSentence(CurrentSentence, recordedNotes);

        playerUiController.ShowTotalScore((int)PlayerScoreController.TotalScore);
        if (sentenceRating != null)
        {
            playerUiController.ShowSentenceRating(sentenceRating);

            if (sentenceRating == SentenceRating.Perfect)
            {
                perfectSentenceChain++;
            }
            else
            {
                perfectSentenceChain = 0;
            }

            if (perfectSentenceChain >= 2)
            {
                playerUiController.CreatePerfectSentenceEffect();
            }
        }

        sentenceIndex++;
        UpdateSentences(sentenceIndex);
    }
예제 #2
0
    private void OnSentenceEnded()
    {
        PlayerNoteRecorder.OnSentenceEnded();
        List <RecordedNote> recordedNotes  = PlayerNoteRecorder.GetRecordedNotes(CurrentSentence);
        SentenceRating      sentenceRating = PlayerScoreController.CalculateScoreForSentence(CurrentSentence, recordedNotes);

        playerUiController.ShowTotalScore(PlayerScoreController.TotalScore);
        if (sentenceRating != null)
        {
            playerUiController.ShowSentenceRating(sentenceRating);
            sentenceRatingStream.OnNext(sentenceRating);
        }

        sentenceIndex++;
        UpdateSentences(sentenceIndex);
    }
예제 #3
0
    private void FinishRecordingSentence(int sentenceIndex)
    {
        PlayerNoteRecorder.OnSentenceEnded();

        Sentence recordingSentence = GetSentence(sentenceIndex);

        if (recordingSentence == null)
        {
            return;
        }

        List <RecordedNote> recordedNotes = PlayerNoteRecorder.GetRecordedNotes(recordingSentence);

        PlayerNoteRecorder.RemoveRecordedNotes(recordingSentence);
        SentenceRating sentenceRating = PlayerScoreController.CalculateScoreForSentence(recordingSentence, recordedNotes);

        playerUiController.ShowTotalScore(PlayerScoreController.TotalScore);
        if (sentenceRating != null)
        {
            playerUiController.ShowSentenceRating(sentenceRating);
            sentenceRatingStream.OnNext(sentenceRating);
        }
    }