コード例 #1
0
    private void CheckWin()
    {
        if (onGameEndEvent != null)
        {
            onGameEndEvent();
        }

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

        //print("win");
        IsGameRunning = false;
        BGM.Stop();
    }
コード例 #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);
            }
        }
    }