Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/FisheryExit.cs
2026-02-21 16:45:37 +08:00

30 lines
529 B
C#

using UnityEngine;
public class FisheryExit : MonoBehaviour
{
public void Awake()
{
if ((bool)GetComponent<MeshRenderer>())
{
GetComponent<MeshRenderer>().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();
}
}
}