public void EnemyAttack(Transform target) { if (IsDead) { return; } _musicBGManager.PlayAudio(); if (Vector2.Distance(transform.position, target.position) < _attackDistance) { SetMove(target, _walkingSpeedChase); _combat.ShouldAttack(); Rotate(target); } else { SetMove(target, _walkingSpeedChase); Rotate(target); } }
public void Attack() { _combat.ShouldAttack(); }