Esempio n. 1
0
    private void GameOver()
    {
        if (IsGameOver)
        {
            return;
        }

        IsGameOver       = true;
        Cursor.visible   = true;
        Cursor.lockState = CursorLockMode.None;

        GameData.FinalScore = Score;

        if (SceneFader)
        {
            SceneFader.OnFadeOutToScene("GameOverScene");
        }
        else
        {
            SceneManager.LoadScene("GameOverScene");
        }
    }