18 lines
419 B
C#
18 lines
419 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class AntennaTouch : MonoBehaviour
|
|
{
|
|
public Action<Collider, bool> touched;
|
|
|
|
// void OnTriggerEnter(Collider other) {
|
|
// touched?.Invoke(other, true);
|
|
// }
|
|
void OnTriggerStay(Collider other) {
|
|
touched?.Invoke(other, true);
|
|
}
|
|
void OnTriggerExit(Collider other) {
|
|
touched?.Invoke(other, false);
|
|
}
|
|
}
|