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

public class SceneManager : MonoBehaviour {

    #region Public Attributes

    public GameObject applicationManagerPrefab;

    #endregion

    #region Private Attributes

    // private attributes

    #endregion

    #region Public Functions

    public void requestSceneChange(string requestedSceneName)
    {
        ApplicationManager.instance.registerSceneChange(requestedSceneName);
    }

    public void initScene()
    {
        Debug.Log("Event: Init Scene");
    }

    #endregion

    #region Private Functions

    #endregion

    #region Unity Events

    // Use this for initialization
    void Awake () {
        // check if ApplicationManager have to be instantiate
        if (ApplicationManager.instance == null && applicationManagerPrefab != null)
        {
            Instantiate(applicationManagerPrefab);
        }

        ApplicationManager.instance.registerSceneManagerAndController(this, this.GetComponent<SceneController>());
    }

    // Update is called once per frame
    void Update () {
		
	}

    #endregion
}
