private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Player")) { if (puc.pickupCount == 4) { Debug.Log("game over"); gcs.FinishedGame(); } else { Debug.Log("missing tacos, you only have " + puc.pickupCount); } } }
//This states that when an object enters the finish zone, let the //game control know that the current game has ended void OnTriggerEnter(Collider other) { gameControlScript.FinishedGame(); }