void Update() { if (seismicAttack != null && seismicAttack.CanExecute() && tracker.GetAllTargets().Count > 4) { seismicAttack.Execute(); } else if (basicAttack.CanExecute() && tracker.GetAllTargets().Count > 0) { basicAttack.Execute(); } if (this.animator != null && navMeshAgent != null) { this.animator.SetFloat("Speed", (this.navMeshAgent.velocity.magnitude / this.navMeshAgent.speed)); } }
void Update() { if (charAnimator != null) { charAnimator.SetFloat("Speed", navMesh.velocity.magnitude / navMesh.speed); } if (targetTracker.targets.Count > 0) { if (targetTracker.targets.Count < 8 && basicAttack != null && basicAttack.CanExecute()) { basicAttack.Execute(); } else if (seismicAttack != null && seismicAttack.CanExecute()) { seismicAttack.Execute(); } } }