using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ZombieDetector : MonoBehaviour {

    [SerializeField]
    private ZombieAIController aiController;

    void OnTriggerEnter (Collider other) {
        var player = other.GetComponent<Player>();
        if (player && player.Health.IsAlive && player.HasAntena) {
            aiController.Target = player;
            aiController.ChangeState(new ZombieChaseState());
        }
    }

}
