Beispiel #1
0
    /// <summary>
    /// Increases the score and adjusts brightness of background image depending on the score
    /// </summary>
    /// <param name="amount"></param>
    private void IncreaseScore(int amount)
    {
        if (amount > Variables.Match3Score)
        {
            Companion.SayGreat();
        }

        if (Variables.GameMode == 0)
        {
            score += amount;
            ShowScore();
            float color = MapValue(score, 0, Variables.WinScore, Variables.MinColor, Variables.MaxColor);
            Background.color = new Vector4(color, color, color, 1);
        }
    }