using UnityEngine; public class BlockDrop_CarrotTrap : MonoBehaviour { public float lifeTime = 15f; void Start() { Destroy(gameObject, lifeTime); } void OnTriggerEnter(Collider other) { if (other.CompareTag("Player") || other.GetComponent() != null) { BlockDrop_GameManager3D.Instance.GameOver("Wolf hit a carrot trap!"); } } }