public void Tick() { if (_gatherer.Target != null) { if (_nextTakeResourceTime <= Time.time) { _nextTakeResourceTime = Time.time + (1f / _resourcesPerSecond); _gatherer.TakeFromTarget(); _animator.SetTrigger(Harvest); } } }