Пример #1
0
    public void OnPiecePopped(Piece piece, int scoreIndex)
    {
        // to-do: add leaf effects flying towards the counters and stuff here
        playerState.AddLeaves(piece.leafIndex, Random.Range(3, 6));
        // scoring
        int addScore = scoringData.GetPopScore(scoreIndex);

        playerState.score += addScore;
        // UI hint
        scoreParticles.SpawnParticle(piece.transform.position, addScore);
    }