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

public class MainMenuManager : MonoBehaviour
{
    public InputField usernameInput;

    private string username = string.Empty;

    public string scene = "TestGeneration";

    private void Start()
    {
        DontDestroyOnLoad(gameObject);
    }

    public string Username { get; }
    public bool GetUsername()
    {
        return true;

        username = usernameInput.textComponent.text;
        if (username != string.Empty)
            return true;
        else
            return false;
    }
    public void EnterGame()
    {
        if(GetUsername())
        {
            LoadScene(scene);
        }
    }

    public void LoadScene(string _scene)
    {
        SceneManager.LoadScene(_scene);
    }

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