using UnityEngine;
using System.Collections.Generic;

public class GUIManager : MonoBehaviour {

    // --------------- Singleton Pattern ---------------
    private static GUIManager instance = null;

    public static GUIManager Instance {
        get {
            if (instance == null) {
                instance = Object.FindObjectOfType(typeof(GUIManager)) as GUIManager;

                if (instance == null) {
                    GameObject go = new GameObject("Manager");
                    DontDestroyOnLoad(go);
                    instance = go.AddComponent<GUIManager>();
                }
                DontDestroyOnLoad(instance.gameObject);
            }
            return instance;
        }
    }
    // --------------- Singleton Pattern ---------------
}
