private void Update() { DisplayResources(); if (isWaveInProgress && unitDatabase.IsEmpty() && !enemySpawner.IsSpawning()) { Debug.Log("No more enemies. Spawn next wave after time between waves."); isWaveInProgress = false; } else if (!isWaveInProgress) { intermissionTimer += Time.deltaTime; if (intermissionTimer >= timeBetweenWaves) { CycleWave(); RestartTimers(); } } }