diff --git a/Assets/Scripts/AI NPC/EnemyAI.cs b/Assets/Scripts/AI NPC/EnemyAI.cs index 41210a9f..2906a2e3 100644 --- a/Assets/Scripts/AI NPC/EnemyAI.cs +++ b/Assets/Scripts/AI NPC/EnemyAI.cs @@ -26,10 +26,13 @@ public class EnemyAI : MonoBehaviour private void Start() { + player = GameObject.FindGameObjectWithTag("Player").transform; nextShootTime = Time.time + Random.Range(minShootDelay, maxShootDelay); InitBehaviorTree(); } + + private void Update() { behaviorTreeRoot?.Evaluate();