March 2018
Beginner
336 pages
8h 6m
English
In this section, we will edit the appropriate script to add five points for each cherry picked. Here are the steps:
_ptsManager = GameObject.Find ("Score_Value").GetComponent<PointsManager> ();PointsManager.currentScore = PointsManager.currentScore + 5;
The two lines of preceding code create a reference to the PointsManager script and, on the second line, increments the currentScore by 5.
The updated CucumberManManager script should be as follows:
using System.Read now
Unlock full access