private void OnParticleCollision(GameObject other)
 {
     if (other.CompareTag("Band"))
     {
         gameOver.StopInput();
         Destroy(gameObject);
     }
     if (other.CompareTag("Can"))
     {
         DeleteParticles();
         scoreLogic.AddScore();
     }
 }
示例#2
0
    public int UpdateScore()
    {
        int s1 = 0;
        int s2 = 0;

        for (int i = 0; i < tiles.Length; i++)
        {
            if (localPlayerGrid[i] != "")
            {
                s1 += tiles[i].scoreMult * scoreMultiplier;
            }

            if (enemyPlayerGrid[i] != "")
            {
                s2 += tiles[i].scoreMult * scoreMultiplier;
            }
        }

        int scoreDelta = s1 - oldScore;

        scoreLogic.AddScore(scoreDelta, true, scoreText, s1);

        if (scoreDelta > bestWordScore)
        {
            bestWordScore = scoreDelta;
        }

        if (scoreDelta > 0)
        {
            numClues++;
            gameAudio.PlayOneShot(gameAudio.solvedClueAudio, 1.0f);
        }

        scoreDelta = s2 - oldEnemyScore;
        scoreLogic.AddScore(scoreDelta, false, enemyScoreText, s2);

        if (scoreDelta > bestWordScoreEnemy)
        {
            bestWordScoreEnemy = scoreDelta;
        }

        if (scoreDelta > 0)
        {
            numCluesEnemy++;
            gameAudio.PlayOneShot(gameAudio.enemySolvedClueAudio, 1.0f);
        }

        //scoreText.text = "ME: " + s1;
        //enemyScoreText.text = "YOU: " + s2;
        oldScore      = s1;
        oldEnemyScore = s2;


        if (HomeLogic.isUsingSkillz)
        {
            if (SkillzCrossPlatform.IsMatchInProgress())
            {
                SkillzCrossPlatform.UpdatePlayersCurrentScore(s1);
            }
        }

        return(s1);
    }