private void TryDropoff(City city)
 {
     if(cargo == null  || cargo.city != city.city) {
         return;
     }
     GameDriver.Instance.CargoDelivered(cargo);
     Destroy(cargo.gameObject);
     cargo = null;
     AudioSource.PlayClipAtPoint(dropoffSound, Camera.main.transform.position);
 }
Beispiel #2
0
 public void Awake()
 {
     numCities = GameObject.FindObjectsOfType<City>().Length;
     city = transform.parent.GetComponent<City>();
 }