void Update() { _timeSinceLastTick += Time.deltaTime; if (_waitTimer > 0) { _waitTimer -= Time.deltaTime; if (_activeAi != null) { _activeAi.DoWhileWaiting(); } } else if (_activeAi != null && _timeSinceLastTick > _activeAi.Frequency) { _timeSinceLastTick = 0f; if (!IsDormant) { _activeAi.Tick(); } } }