protected override void Update() { base.Update(); if (GetTargetDistance() <= attackRange) { KillTarget(); } sm.Update(); }
void Update() { transform.forward = (target.transform.position - transform.position).normalized; if (Vector3.Distance(target.transform.position, transform.position) <= range) { SetCastingAttackState(); } else { SetIdleState(); } sm.Update(); }
public void UpdateStateMachine() { _stateMachine.Update(); }
private void Update() { attackTimer -= Time.deltaTime; _sm.Update(); }