Exemple #1
0
    public void UpdateLives()
    {
        if (!player_lives)
        {
            player_lives = GameObject.FindObjectOfType <PlayerLives>();
        }

        player_lives.decrement_lives();
        if (player_lives.is_player_dead())
        {
            player_lives.recover_full_health();
            levelManager.loadMenu();
        }
        else
        {
            levelManager.RestartLevel();
        }
    }