30 lines
529 B
C#
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();
|
|
}
|
|
}
|
|
}
|