using System.Collections; using System.Collections.Generic; using UnityEngine; public class PassTheEdgeTrigger : MonoBehaviour { public delegate void ThresholdEdge(); public static event ThresholdEdge OnPassingTheEdge; private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("PlayerBody")) { OnPassingTheEdge?.Invoke(); } } }