18 lines
410 B
C#
18 lines
410 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PassTheEdgeTrigger : MonoBehaviour
|
|
{
|
|
public delegate void ThresholdEdge();
|
|
public static event ThresholdEdge OnPassingTheEdge;
|
|
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.gameObject.CompareTag("PlayerBody"))
|
|
{
|
|
OnPassingTheEdge?.Invoke();
|
|
}
|
|
}
|
|
}
|