using UnityEngine;

public class CreakingFloorBoards : MonoBehaviour
{
	private float time = 0f;
	
	void FixedUpdate()
	{
		if(time > 0.01f)
			time -= 0.01f;
		else
			time = 0;
	}
	
	void OnTriggerEnter2D (Collider2D col)
	{
		if(true)
		{
			Wave.createWave(col.transform.position, transform.position - col.transform.position, 270, 15, 30, false);
			gameObject.GetComponent<AudioSource>().Play();
		}
	}
}