using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public class ShellBoom : MonoBehaviour { public UnityEvent onShellAttack; public bool isPlayer = false; private void OnTriggerEnter(Collider other) { if (isPlayer && other.tag == "AttackTarget") { onShellAttack?.Invoke(); } } }