private void Update() { timeSinceLastAttack += Time.deltaTime; if (IsAttacking && target != null) { if (isOutOfRange()) { moveService.MoveTo(target.transform.position); } else { moveService.SetActive(false); moveService.RotateTowards(target.transform); AttackBehaviour(); } } }
public void Begin() { moveService.SetActive(true); }