using UnityEngine;

public abstract class ReactOnWaveHit : MonoBehaviour
{
	public abstract void hitByWave(Wave wave, float strength);
	
	void OnTriggerEnter2D(Collider2D other)
	{
		Wave wave = other.gameObject.GetComponent<Wave>();
		if(wave.doesHit)
			hitByWave(wave, wave.life);
	}
}