﻿using UnityEngine;
using System.Collections;

public class EPTriggerSignal : EPTagFilterBehaviour {

	public Signal onEnter;
	public Signal onStay;
	public Signal onExit;

	void Start(){
		Debug.LogWarning("Warning: This script is deprecated, use EPOnTriggerEnterSignal or EPOnTriggerExitSignal");
	}

	void OnTriggerEnter(Collider other){
		if(checkFilterWithTag(other.gameObject.tag))
			onEnter.Invoke();
	}

	void OnTriggerStay(Collider other){
		if(checkFilterWithTag(other.gameObject.tag))
			onStay.Invoke();
	}

	void OnTriggerExit(Collider other){
		if(checkFilterWithTag(other.gameObject.tag))
			onExit.Invoke();
	}

}
