using UnityEngine;
using System.Collections;

public class PickupItem : MonoBehaviour {
	[SerializeField] private string keyName;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void OnTriggerEnter(Collider other)
	{
		if (other.tag == "Hero")
		{
			other.GetComponent<Hero>().addkey(keyName);
			gameObject.SetActive(false);
		}

	}
}
