Пример #1
0
    // After player dies, activate death menu and stop all Coroutine
    public void RestartGame()
    {
        // Deactivate player
        player.gameObject.SetActive(false);

        // Activate death menu
        deathMenu.gameObject.SetActive(true);
        deathMenu.ShowFinalScore();

        // Deactivate score
        scoreCount.SetActive(false);

        // Stop all Coroutines
        moonController.Pause();
        buffGenerator.Pause();

        // Stop BGM
        StartCoroutine("FadeOutBGM");
    }