using UnityEngine;

public class SpikeDeath : MonoBehaviour
{
    public GameObject respawnPosition;

    public GameObject deadBody;

    // Detect when player is standing in front of the door
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.CompareTag("Player"))
        {
            collision.gameObject.GetComponent<PlayerMovement>().KillPlayer();
        }
    }
}
