示例#1
0
    public void OnCarrotPicked()
    {
        if (isGameOver)
        {
            return;
        }

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