public void onClickReplay()
    {
        StaticGameData.isLost      = false;
        StaticGameData.Game.Points = 0;

        StaticGameData.Game = StaticGameData.getNewGame();

        UnityEngine.SceneManagement.SceneManager.LoadScene("LoadingScreen");
        UnityEngine.SceneManagement.SceneManager.UnloadSceneAsync("EndingScreen");
    }
Example #2
0
    void Start()
    {
        if (StaticGameData.isMusicOn)
        {
            GetComponent <AudioSource>().volume = 0.775f;
        }
        else
        {
            GetComponent <AudioSource>().volume = 0;
        }
        Screen.fullScreen              = true;
        StaticGameData.Game            = StaticGameData.getNewGame();
        StaticGameData.winSoundEffect  = this.winSoundEffect;
        StaticGameData.lossSoundEffect = this.lossSoundEffect;

        StaticGameData.saveHighScore();
    }