예제 #1
0
    // increment the player's score
    void IncrementScore()
    {
        for (int i = 0; i < 25; i++)
        {
            int currentNumOfSpecies = numOfEachSpecies[i];
            // if two or more of the same species are found in the match, double the score
            // for those tiles
            if (currentNumOfSpecies > 1)
            {
                scoreNum += currentNumOfSpecies * 2;
            }
            else if (currentNumOfSpecies == 1)
            {
                scoreNum++;
            }
        }

        // make progress controller move up
        progressController.AdjustProgress(scoreNum);
    }
예제 #2
0
    // increment the player's score
    void IncrementScore()
    {
        scoreNum = 0;
        bool haveBonus = false;

        for (int i = 0; i < 25; i++)
        {
            int currentNumOfSpecies = numOfEachSpecies[i];
            // if two or more of the same species are found in the match, double the score
            // for those tiles
            if (currentNumOfSpecies > 1)
            {
                scoreNum += currentNumOfSpecies * 2;
                haveBonus = true;
            }
            else if (currentNumOfSpecies == 1)
            {
                scoreNum++;
            }
        }

        // make progress controller move up
        StartCoroutine(progressController.AdjustProgress(scoreNum));

        // dont display reaction when rechecking the grid
        if (recheckingGrid == false)
        {
            if (haveBonus == true)
            {
                StartCoroutine(DisplayReaction(bonus));
            }
            else
            {
                StartCoroutine(DisplayReaction(awesome));
            }
        }
    }