#pragma strict

var player : GameObject;
var icon : GameObject;

function Start () {
	player = GameObject.Find("Player");
	icon = GameObject.Find("Col4");
}

function Update () {

}

function OnTriggerEnter2D(coll : Collider2D) {
	if (coll.gameObject.name == "Player") {
		icon.GetComponent(CanvasGroup).alpha = 1;
		player.SendMessage("Collect", 4);
		Destroy(gameObject);
	}
}