public void OnCarrotPicked() { if (isGameOver) { return; } currentPickedCarrots = currentPickedCarrots + 1; if (currentPickedCarrots >= carrotsToWin) { isGameOver = true; gameUI.ActivateWinScreen(); Invoke("GoToNextLevel", timeToRestart); } }
public void OnCarrotPicked() { if (isGameOver) { return; } currentPickedCarrots = currentPickedCarrots + 1; if (currentPickedCarrots >= carrotsToWin) { isGameOver = true; gameUI.ActivateWinScreen(); Invoke("GoToNextLevel", timeToRestart); } }