Exemple #1
0
 protected override void Update()
 {
     base.Update();
     if (GetTargetDistance() <= attackRange)
     {
         KillTarget();
     }
     sm.Update();
 }
Exemple #2
0
 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();
 }