using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Collect : MonoBehaviour {
	

	public Text countText;
	public Text winText;

	public static int count;

	void Start ()
	{
		count = 0;
		SetCountText ();
		winText.text = "";
	}

	void OnTriggerEnter2D(Collider2D other)
	{
		if (gameObject.CompareTag ( "Pick Up"))
		{
			Destroy (gameObject);
			count = count + 1;
			SetCountText ();
		}
	}
	void SetCountText ()
	{
		countText.text = "Count: " + count.ToString ();
		if (count >= 9)
		{
		}
	}
}
