using Managers;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class LevelSelectionController : MonoBehaviour
{
    public string levelOneSceneName = "Level1";
    public string levelTwoSceneName = "Level2";
    public string levelThreeSceneName = "Level3";
    public string mainMenuSceneName = "MainMenu";
    public string introSceneName = "IntroScene";

    public void OnLevelOneButton()
    {
        SceneManager.LoadScene(levelOneSceneName);
    }

    public void OnLevelTwoButton()
    {
        if(GlobalData.lastCompletedLevel >= 1)
            SceneManager.LoadScene(levelTwoSceneName);
    }

    public void OnLevelThreeButton()
    {
        if (GlobalData.lastCompletedLevel >= 2)
            SceneManager.LoadScene(levelThreeSceneName);
    }

    public void OnMainMenuButton()
    {
        SceneManager.LoadScene(mainMenuSceneName);
    }

    public void OnIntroSceneButton()
    {
        SceneManager.LoadScene(introSceneName);
    }
}