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

17 lines
282 B
C#

using System;
using UnityEngine;
public class AIHandler : MonoBehaviour
{
public event Action<AIBase> onAIDisable;
private void OnTriggerEnter(Collider other)
{
AIBase ai = other.GetComponentInParent<AIBase>();
if (ai != null)
{
this.onAIDisable?.Invoke(ai);
}
}
}