using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

using TMPro;

public class UIMangerGameOverScreen : MonoBehaviour
{
    


    [SerializeField]
    private TextMeshProUGUI textScore;

    [SerializeField]
    private Button mainMenuButton;

    private void Start()
    {
        mainMenuButton.onClick.AddListener(OnMainMenuButtonClicked);
    }

    void Update()
    {
        textScore.text = $"Score: {PersistantStorage.Instance.Score}m";
    }

    public void OnMainMenuButtonClicked()
    {
        GameStateManager.Instance.SetGameState(GameState.Menu);
    }
}
