using UnityEngine;
using System.Collections;

public class Inventory : MonoBehaviour {

	//Inventory List
	public enum Items
	{
		flashlight,
		bedroomKey,
		coin,
		record
	};

	//Item status
	public bool flashlight = false;
	public bool bedroomKey = false;
	public bool coin = false;
	public bool record = false;

	//Item 3D objects
	public GameObject flashlightGO;
	public GameObject bedroomKeyGO;
	public GameObject coinGO;
	public GameObject recordGO;

	public void AddItem (string item)
	{
		switch (item) {
		case "flashlight":
			flashlight = true;
			flashlightGO.SetActive (true);
			break;
		case "bedroomKey":
			bedroomKey = true;
			bedroomKeyGO.SetActive (true);
			break;
		case "coin":
			coin = true;
			coinGO.SetActive (true);
			break;
		case "record":
			record = true;
			recordGO.SetActive (true);
			break;
		default:
			break;
		}
	}

	public void RemoveItem (string item)
	{
		switch (item) {
		case "flashlight":
			flashlight = false;
			flashlightGO.SetActive (false);
			break;
		case "bedroomKey":
			bedroomKey = false;
			bedroomKeyGO.SetActive (false);
			break;
		case "coin":
			coin = false;
			coinGO.SetActive (false);
			break;
		case "record":
			record = false;
			recordGO.SetActive (false);
			break;
		default:
			break;
		}
	}

	public bool CheckItem (string item)
	{
		switch (item) {
		case "flashlight":
			return flashlight;
		case "bedroomKey":
			return bedroomKey;
		case "coin":
			return coin;
		case "record":
			return record;
		default:
			return false;
		}
	}
}