Exemple #1
0
 public static void GameOverWin()
 {
     collectedLogs = 0;
     StaticData.ClearLevel();
     StaticData.SetPlayerScore();
     SceneManager.LoadScene("GameOverWin");
 }
Exemple #2
0
    // Update is called once per frame
    void Update()
    {
        timer         -= Time.deltaTime;
        timerText.text = string.Format("{00}", timer);


        //Victory and Lose Conditions
        if (timer <= 0)
        {
            StaticData.Score = 0;
            GameOverLose();
        }
        if (collectedLogs >= logsToWin)
        {
            StaticData.SetPlayerScore();
            StaticData.Score = 0;
            StaticData.ClearLevel();
            GameOverWin();
        }
    }