public override void Excute() { if (!_enemy.Search(_enemy.GetPlayer.transform, _enemy._attackRange)) { _enemy.SetState("Chase"); } else if (_enemy.Attackable) { _enemy.SetState("Attack"); } }
public override void Enter() { if (_enemy.Attackable) { _enemy.PlayAnimation(GetID); _currentTime = 0; _animationLength = _enemy.GetAnimationLength(); } else { _enemy.SetState("AttackIdle"); } }
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"); } }
public override void Excute() { if (_enemy.Search(_enemy.GetPlayer.transform, _enemy._detectionRange)) { _enemy.SetState("Chase"); return; } if (_currentTime >= _stayTime) { _enemy.SetState(_transition); } else { _currentTime += Time.fixedDeltaTime; } }