Ejemplo n.º 1
0
    private void CheckWin()
    {
        if (onGameEndEvent != null)
        {
            onGameEndEvent();
        }

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

        //print("win");
        IsGameRunning = false;
        BGM.Stop();
    }
Ejemplo n.º 2
0
    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);
            }
        }
    }