Files
2026-03-08 18:50:02 -06:00

24 lines
462 B
C#

using UnityEngine;
[System.Serializable]
public class FocalPoint : MonoBehaviour
{
[SerializeField] bool isInGoal = false;
void OnTriggerEnter(Collider other) {
if (other.gameObject.tag == "Goal") {
isInGoal = true;
}
}
void OnTriggerExit(Collider other) {
if (other.gameObject.tag == "Goal") {
isInGoal = false;
}
}
public bool GetIsInGoal() {
return isInGoal;
}
}