23 lines
488 B
C#
23 lines
488 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace BlueWater.Maps
|
|
{
|
|
public class NormalMapTrigger : MonoBehaviour
|
|
{
|
|
public Action OnPlayerEntrance;
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (!other.CompareTag("Player")) return;
|
|
|
|
gameObject.SetActive(false);
|
|
OnPlayerEntrance?.Invoke();
|
|
}
|
|
|
|
public void ResetTrigger()
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
}
|
|
} |