using UnityEngine;
using System.Collections;

public class SpriteManager : MonoBehaviour {

    
    #region Sprite reference
    public SpriteRenderer fireExtinguisher;
    #endregion

    private static SpriteManager s_Instance = null;

    public static SpriteManager instance
    {
        get
        {
            if (s_Instance == null)
            {
                s_Instance = FindObjectOfType(typeof(SpriteManager)) as SpriteManager;
            }

            if (s_Instance == null)
            {
                GameObject obj = new GameObject("SpriteManager");
                s_Instance = obj.AddComponent(typeof(SpriteManager)) as SpriteManager;
            }

            return s_Instance;
        }
    }

    //clean up 
    void OnApplicationQuit()
    {
        s_Instance = null;
    }

    public void displayFireExtinguisher(bool display)
    {
        if (display)
        {
            fireExtinguisher.gameObject.SetActive(true);
        }
        else
        {
            fireExtinguisher.gameObject.SetActive(false);
        }
    }


}
