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