Files
Fishing2/Assets/Obvious/Soap/Examples/Content/Scripts/Enemy.cs
2025-11-10 00:08:26 +08:00

16 lines
374 B
C#

using UnityEngine;
using UnityEngine.Events;
namespace Obvious.Soap.Example
{
public class Enemy : MonoBehaviour
{
[SerializeField] private UnityEvent _onHitPlayerEvent = null;
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
_onHitPlayerEvent?.Invoke();
}
}
}