using UnityEngine; public class BaseTrigger : MonoBehaviour { protected Log log; protected virtual void Awake() { log = FindFirstObjectByType(); } protected virtual void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { OnPlayerEnter(); } } // Override this in subclasses protected virtual void OnPlayerEnter() { } }