using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class MenuManager : MonoBehaviour
{
    public PanelGroup panelGroup;

    public MenuPanel menuPanel => panelGroup.GetPanel<MenuPanel>();
    public LevelsPanel levelsPanel => panelGroup.GetPanel<LevelsPanel>();

    public static MenuManager instance { get; private set; }

    private void Awake()
    {
        instance = this;
        Application.targetFrameRate = 60;
    }

    private void Start()
    {
        menuPanel.OpenPanel();
    }

    public static void LoadMenu()
    {
        GameManager.SetPause(false);
        SceneManager.LoadScene("Menu");
    }
}
