敌人攻击逻辑脚本
public enum Type { Melee, Range, Boss }
public Type enemyType;
public float enemyone = 1;
public Transform target;
public BoxCollider meleeArea;
public GameObject bullet;
protected Rigidbody _rigidbody;
protected NavMeshAgent _navMeshAgent;
protected Animator _animator;
protected Health _health;
private float _targetRadius;
private float _targetRange;
private bool _isChase;
private bool _isAttack;
private void Awake()
{
_rigidbody = GetComponent<Rigidbody>();
_navMeshAgent = GetComponent<NavMeshAgent>();
_animator = GetComponentInChildren<Animator>();
_health = GetComponent<Health>();