Beispiel #1
0
    private void CheckWin()
    {
        if (onGameEndEvent != null)
        {
            onGameEndEvent();
        }

        //show game end ui
        scoreBoard.GetComponent <GUI_Scoreboard>().ShowScoreBoard();

        //print("win");
        IsGameRunning = false;
        BGM.Stop();
    }
    private void Update()
    {
        mainMenuMusic.Update();
        buttonPress.Update();
        beeping.Update();

        if (isCountdown)
        {
            timeLeft  -= Time.deltaTime;
            timer.text = "Starting in " + timeLeft.ToString("f0");

            if (timeLeft <= 0)
            {
                mainMenuMusic.Stop();
                SceneManager.LoadScene(1);
            }
        }
    }