add project files
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class ThresholdRichHandler : MonoBehaviour
|
||||
{
|
||||
public event Action<ThresholdRichZone> onThresholdZone;
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
ThresholdRichZone zone = other.GetComponentInParent<ThresholdRichZone>();
|
||||
if (!(zone == null) && !zone.isUse && this.onThresholdZone != null)
|
||||
{
|
||||
this.onThresholdZone(zone);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user