using UnityEngine; public class FisheryExit : MonoBehaviour { public void Awake() { if ((bool)GetComponent()) { GetComponent().enabled = false; } } private void OnTriggerEnter(Collider col) { if (col.gameObject.HasTag("PLAYER")) { GameController.Instance.FisheryExitEnter(); Debug.Log("FisheryExit " + col.gameObject.name); } } private void OnTriggerExit(Collider col) { if (col.gameObject.HasTag("PLAYER")) { GameController.Instance.FisheryExitExit(); } } }