using UnityEngine;
using UnityEngine.UI;

namespace UI
{
    public class PauseMenu : MonoBehaviour
    {
        [SerializeField] Button closePauseMenu;
        [SerializeField] Button options;
        [SerializeField] Button quit;

        // Start is called before the first frame update
        void Start()
        {
            EntrySetup();
        }

        void EntrySetup()
        {
            closePauseMenu.onClick.AddListener(ClosePauseMenu);
            options.onClick.AddListener(Options);
            quit.onClick.AddListener(Quit);
        }

        void ClosePauseMenu()
        {
            UIManager.S.PauseGame();
        }

        void Options()
        {
            UIManager.S.EnablePanel("OptionsPauseMenu");
        }

        void Quit()
        {
            Application.Quit();
        }
    }
}
