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

public class GameManager : MonoBehaviour {

    public static GameManager instance { get; private set; }

    public PoolOuvintes ouvintes = PoolOuvintes.instance;

    public float dinheiro = 500f;

    // Use this for initialization
	void Start () {
        if (instance == null) {
            Debug.Log("GameManager = nullll");
            instance = this;
        } else if (instance != null){
            Debug.Log("GameManager = " + instance.name);
            Destroy(gameObject);
        }
        DontDestroyOnLoad(gameObject);

        ouvintes = PoolOuvintes.instance;
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    void OnSceneLoaded(Scene scene, LoadSceneMode mode) {
        if (instance != null) {
            dinheiro = 500f;
        }
    }
}
