Exemple #1
0
    //// Start is called before the first frame update
    //void Start()
    //{

    //}

    //// Update is called once per frame
    //void Update()
    //{

    //}

    public void GameOver(GameOverReasons reason)
    {
        if (onGameOver != null)
        {
            onGameOver();
        }

        gameBeingPlayed = false;
        hud.SetActive(false);
        gameOverScreen.SetActive(true);
        string msg = (reason == GameOverReasons.PlayerDead) ? "You lost." : "YOU WON!!";

        gameOverScreen.SetGameOverScreen(msg, currScore.ToString());
    }