March 2018
Beginner
336 pages
8h 6m
English
In the previous section, we modified the CucumberManManager script to track the number of lives our player has remaining and, when none were left, the appropriate animation was played. In this section, we will continue modifying the CucumberManManager script to update the HUD with the number of lives remaining.
We only need to modify the CucumberManManager script's Update() method. The completed Update() method is provided here with an explanation of the changes made:
void Update () { if (collectingCherries) { if (tempCurrentCherryCount ></span>= 60) { currentCherryCount = currentCherryCount + 1; tempCurrentCherryCount = 0; _ptsManager = GameObject.Find ("Score_Value").GetComponent<PointsManager ...Read now
Unlock full access