using UnityEngine;

public class Obstacle : MonoBehaviour
{
	public GameObject enemyDeath;
	void OnTriggerEnter2D(Collider2D other)
	{
		if(other.tag=="bullet")
		{
			Destroy(gameObject);
			Instantiate(enemyDeath, transform.position, transform.rotation);
		}
		if(other.tag=="Player")
		{
			Destroy(gameObject);
			Instantiate(enemyDeath, transform.position, transform.rotation);
		}

	}
}