Example #1
0
    /// <summary>
    /// Resets the combo count, target color, and balls in between combos.
    /// </summary>
    public void ResetCombo()
    {
        //award the player for maxing out their combo
        if (!Balls.ContainsAnyBallsWithColor(CurrentColor))
        {
            audio.pitch = 1 + ((currentCombo + 1) * 0.1f);
            audio.PlayOneShot(GoodClickSound);
            CurrentScore += currentCombo;
        }
        else
        {
            audio.PlayOneShot(BadClickSound);
        }

        currentCombo = 0;
        CurrentColor = NamedColors.GetRandomExcept(CurrentColor);
        Balls.ResetDisabledBalls();
    }