public void EndGame() { foreach (GameObject g in GameObject.FindGameObjectsWithTag("Muffin")) { Destroy(g); } inputDetector.SetActiveInputDetector(false); scoreManager.LoadEndScore(); canvas.ChangeToEndWindow(); }