using UnityEngine;
using System.Collections;

public class Slam : MonoBehaviour {
	public Transform finalPoint;
	public float stepSize = 3f;
	public bool accepted = false;
	// Use this for initialization
	void Start () {
	
	}

	void OnTriggerEnter2D (Collider2D col) 
	{
		if(col.tag == "Enemy")
		GameObject.FindGameObjectWithTag ("Overlay").GetComponent<BloomOut> ().Bloom = true;
	}

	// Update is called once per frame
	void Update () {
		if(accepted)
		transform.position = Vector3.MoveTowards(transform.position, finalPoint.position, stepSize);
	}
}
