public void Update() { spawnDelta += Time.deltaTime; if (Vector3.Distance(this.gameObject.transform.position, _target.gameObject.transform.position) > _range) { _motor.Move(Vector3.forward, _speed); _isWalking = true; } else { _isWalking = false; if (spawnDelta >= hitSpeed) { HitPlayer(zombiePower); spawnDelta = 0.0f; } } _animator.SetBool(ZombieAnimationConstants.IsWalkingParamName, _isWalking); _motor.Look(_target); }