void Update() { time += Time.deltaTime; if (SceneManager.GetActiveScene().name != "GameplayBowling") { return; } if (!ballGameObject.GetComponent <Ball>().fallen) { return; } if (timeAtFall == 0) { timeAtFall = time; } if (!(time > timeAtFall + resetDelay)) { return; } timeAtFall = 0; ballGameObject.GetComponent <Ball>().ResetBall(); ballGameObject.GetComponent <Ball>().fallen = false; PinManager.Get().DestroyPins(); CheckGameOver(); }