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