NewN_UAVPlane/Assets/Zion/Scripts/Adam/Components/ShellBoom.cs

19 lines
394 B
C#

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