first commit

This commit is contained in:
2026-05-25 23:53:50 +03:00
commit 5081d01aa4
77 changed files with 16985 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
using UnityEngine;
public class NPCTriggerRelay : MonoBehaviour
{
[SerializeField] private NPC owner;
public void Initialize(NPC npc)
{
owner = npc;
}
private void OnTriggerEnter(Collider other)
{
if (owner != null && other.CompareTag("Player"))
{
owner.SetPlayerInRange(true);
}
}
private void OnTriggerExit(Collider other)
{
if (owner != null && other.CompareTag("Player"))
{
owner.SetPlayerInRange(false);
}
}
}