using UnityEngine;
using ScrambleKit;

public class PitDeathCheck : MonoBehaviour
{
	public float DeathBelowHeight = -6f;
	public FXTrigger PitDeathFX;

    void FixedUpdate()
    {
		if (Scoreboard.instance.timesUp)
			return;

        if(transform.position.y < DeathBelowHeight)
		{
			if(!Scoreboard.instance.playerDied)
			{
				PitDeathFX.Trigger(transform);
			}
			Scoreboard.instance.playerDied = true;
		}
    }
}
