﻿using UnityEngine;
using System.Collections;

public class EPSignalSpawner : MonoBehaviour {

	public GameObject prefab;
	public int spawnLimit = 1;

	[Signal]
	void spawn(){		
		Instantiate(prefab, transform.position, transform.rotation);
		spawnLimit--;
		if(spawnLimit == 0) Destroy(this);
	}
}
