using UnityEditor;
using UnityEditor.UI;
using UnityEngine;
using UnityEngine.SceneManagement;

public class MainMenu : MonoBehaviour
{
    GameObject settingsMenu;
    GameObject mainMenu;

    private void Start()
    {
        settingsMenu = GameObject.Find("SettingsCanvas");
        mainMenu = GameObject.Find("MainMenuCanvas");
        if(settingsMenu && mainMenu)
        {
            mainMenu.SetActive(true);
            settingsMenu.SetActive(false);
        }
    }

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

    public void GoToSettingsMenu()
    {
        mainMenu.SetActive(false);
        settingsMenu.SetActive(true);
    }

    public void GetBackToMainMenuFromSettingsMenu()
    {
        settingsMenu.SetActive(false);
        mainMenu.SetActive(true);
    }

    public void NewGame()
    {
        GameManager.gameManagerInstance.StartGame();
    }

    public void GoToMainMenuFromInGameScreen()
    {
        GameManager.gameManagerInstance.GoBackToMainMenu();
    }
}
