using UnityEngine;
using System.Collections;

public class LevelCompleted : MonoBehaviour
{
	bool pressed;
	private Completion comp;

	void Start()
	{
		comp = FindObjectOfType<Completion> ();
	}

	void OnTriggerEnter2D(Collider2D col)
	{
		if(col.gameObject.tag == "Player" && !pressed)
		{
			pressed = true;
			comp.CompletedLevel();
		}
	}
}
