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

public class MainMenuScript : MonoBehaviour {

    enum MainMenuState { MainMenu, Play, Credits, Instructions };
    MainMenuState currentState = MainMenuState.MainMenu;
    [SerializeField] GameObject mainMenuHolder;
    [SerializeField] GameObject playFirstHolder;
    [SerializeField] GameObject creditsHolder;
    [SerializeField] GameObject instructionsHolder;

    //[SerializeField] Button mainMenuFirstSelected;
    //[SerializeField] Button playFirstSelected;
    //[SerializeField] Button creditsFirstSelected;
    //[SerializeField] Button instructionsFirstSelected;

    // Use this for initialization
    void Start () {
        SetStateToMainMenu();

    }
	
	// Update is called once per frame
	void Update () {
		if(currentState == MainMenuState.MainMenu)
        {

        }
        else if (currentState == MainMenuState.Play)
        {

        }
        else if (currentState == MainMenuState.Credits)
        {

        }
        else if (currentState == MainMenuState.Instructions)
        {

        }
    }

    public void LoadVsAiLevel()
    {
        SceneManager.LoadScene("LevelAI");
    }

    public void Load2PlayerLevel()
    {
        SceneManager.LoadScene("Level2P");
    }

    public void SetStateToMainMenu()
    {
        mainMenuHolder.SetActive(true);
        playFirstHolder.SetActive(false);
        creditsHolder.SetActive(false);
        instructionsHolder.SetActive(false);
    }

    public void SetStateToPlay()
    {
        mainMenuHolder.SetActive(false);
        playFirstHolder.SetActive(true);
        creditsHolder.SetActive(false);
        instructionsHolder.SetActive(false);
    }

    public void SetStateToCredits()
    {
        mainMenuHolder.SetActive(false);
        playFirstHolder.SetActive(false);
        creditsHolder.SetActive(true);
        instructionsHolder.SetActive(false);
    }

    public void SetStateToInstructions()
    {
        mainMenuHolder.SetActive(false);
        playFirstHolder.SetActive(false);
        creditsHolder.SetActive(false);
        instructionsHolder.SetActive(true);
    }

  
}
