public override void Excute() { if (_enemy.Search(_enemy.GetPlayer.transform, _enemy._detectionRange)) { _enemy.SetState("Chase"); return; } if (_enemy.GoToTarget(_target.position)) { _enemy.SetState(_transition); } }
public override void Excute() { _enemy.GoToTarget(_target.position); if (_enemy.Search(_target, _enemy._attackRange)) { _enemy.SetState("Attack"); } else if (!_enemy.Search(_target, _enemy._detectionRange)) { _enemy.SetState("Idle"); } }