IEnumerator SpawnWithDelay(SpawnInfo spawnInfo, Transform container, int index, int highest, bool last) { float value = index / (float)highest; yield return(new WaitForSecondsRealtime(value * SPAWNING_DELAY_MULTIPLIER)); spawnInfo.Spawn(container); if (last) { yield return(new WaitForSecondsRealtime(value * SPAWNING_DELAY_MULTIPLIER / 2)); _readyToFixNormals = true; } }