using UnityEngine;
using System.Collections;

public class Particle : MonoBehaviour {
	protected PlayerInventory inventory;

	void Awake()
	{
		inventory = GameObject.Find("Player").GetComponent<PlayerInventory>();
	}

	void PickupItem()
	{
		inventory.AddItem(transform.name);
	}

	void OnTriggerEnter2D(Collider2D col)
	{
		inventory.AddItem(transform.name);
		Destroy(gameObject);
	}


	// check if item inventory slot exists, if not create it and add 1 to it
	// if exists add 1 to it
}
