using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class StartMenu : MonoBehaviour
{

    public Canvas quitMenu;
    public Button startText;
    public Button exitText;
    public static bool showCursor;
    // Use this for initialization
    void Start()
    {
        // Get Canvas/Buttons and disable the quit menu
        quitMenu = quitMenu.GetComponent<Canvas>();
        startText = startText.GetComponent<Button>();
        exitText = exitText.GetComponent<Button>();

        quitMenu.enabled = false;
        showCursor = true;
        Cursor.visible = showCursor;

    }

    // Open QuitMenu if press quit button
    public void ExitPress()
    {
        quitMenu.enabled = true;
        startText.enabled = false;
        exitText.enabled = false;
    }
    // Close QuitMenu when pressing no
    public void NoPress()
    {
        quitMenu.enabled = false;
        startText.enabled = true;
        exitText.enabled = true;
    }

    // Load level when pressing start
    public void StartLevel()
    {
        

        SceneManager.LoadScene("lvl_00");

    }
    
    public void MainMenu()
    {
        SceneManager.LoadScene("Startmenu");
    }
    public void Options()
    {
        SceneManager.LoadScene("credits");
    }
    // Exit game when pressing yes button in QuitMenu
    public void ExitGame()
    {
        Application.Quit();
    }
}
