using System;
using UnityEngine;
using UnityEngine.UI;

public class MainMenuController : MonoBehaviour
{
    [Header("Buttons")] 
    [SerializeField] private Button startButton;
    [SerializeField] private Button tutorialButton;
    [SerializeField] private Button exitButton;

    private void Start()
    {
        //delete all the existing listeners to make sure.
        startButton.onClick.RemoveAllListeners();
        tutorialButton.onClick.RemoveAllListeners();
        exitButton.onClick.RemoveAllListeners();
        //add the listeners to the buttons
        startButton.onClick.AddListener(() => GameManager.Instance.StartGame());
        tutorialButton.onClick.AddListener(()=> GameManager.Instance.StartTutorial());
        exitButton.onClick.AddListener(()=> GameManager.Instance.ExitGame());
    }
}
