using UnityEngine;
using System.Collections;

public class PlayerInventory : MonoBehaviour
{
    public GameObject currentItem;

    //HUD
    public GameObject extinguisherSlider;
    public GameObject extinguisherSprite;
    public GameObject extinguisher;

    private static PlayerInventory s_Instance = null;

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

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

            return s_Instance;
        }
    }

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

    public void PickUpExtinguisher()
    {
        extinguisherSlider.SetActive(true);
        extinguisherSprite.SetActive(true);
    }

    public  void DropExtinguisher()
    {
        extinguisherSlider.SetActive(false);
        extinguisherSprite.SetActive(false);
    }

    public void AddExtinguisherAmmo(float ammo)
    {
        //extinguisher.GetComponent<Shooting>().PickUpAmmo(ammo);
    }

}
