Пример #1
0
    public void OnCompleteLevel(int correct, int wrong)
    {
        // Show LevelComplete then go to the next level.
        totalCorrect += correct;
        totalWrong   += wrong;
        totalLevels++;

        // Clean up any remaining foods that weren't used (cat and dog food do not generate food checks and are not mandatory)
        foodManager.CleanupFoods(currentFood);

        dialogueBetweenLevels.variables = new RPGTALK.Helper.RPGTalkVariable[]
        {
            new RPGTALK.Helper.RPGTalkVariable()
            {
                variableName  = "foodCorrectCount",
                variableValue = totalCorrect.ToString()
            },

            new RPGTALK.Helper.RPGTalkVariable()
            {
                variableName  = "foodWrongCount",
                variableValue = totalWrong.ToString()
            },

            new RPGTALK.Helper.RPGTalkVariable()
            {
                variableName  = "levelCount",
                variableValue = totalLevels.ToString()
            }
        };

        Utils.PlayRandomSound(audioSource, successSounds);
        StartDialogue(dialogueBetweenLevels);
    }