In this section, we will continue working on the CucumberManManager script to simulate the collection of cherries.
If you do not already have the script open, open it now in an editor. We will review the updated code in five sequential sections.
Our first section, shown here, imports the three necessary namespaces.
using System.Collections; using System.Collections.Generic; using UnityEngine; public class CucumberManManager : MonoBehaviour { public static int currentCherryCount; public int tempCurrentCherryCount; public bool collectingCherries;
The fourth line of code is the class declaration statement. The last three lines of code in this section are the class variables. Here is a brief description ...