Add variable to Player script to track score.
Add variable to Player script to track score.
Add a new function to update the score
Add a new function to update the score
We use a parameter so that we can update the score by different amounts as required by the game design.
We use a parameter so that we can update the score by different amounts as required by the game design.