using UnityEngine;
using System.Collections;

public class spawnText : MonoBehaviour
{
	public Transform prefab;
	public Transform loc;

	void OnTriggerEnter2D(Collider2D col)
	{
		if(col.gameObject.tag == "Player1" || col.gameObject.tag == "Player2")
		{
			Instantiate(prefab, loc.transform.position, Quaternion.identity);
		}
	}
}
