Files
butchers-games-test/Assets/Scripts/Game/Player/ThresholdRichHandler.cs
T
Boris Nikolaev 5f1e94b653 add project files
2026-08-14 01:58:31 +03:00

17 lines
382 B
C#

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);
}
}
}