add project files
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user