I’m currently working on the 2D course & am working through the Laser Defender section. I was hoping somebody could explain a certain section in a bit more detail as I’m having trouble understanding it completely.
In our EnemySpawner.cs Script our coroutine begins with the following:
" private IEnumerator SpawnAllEnemiesInWave(WaveConfig waveConfig) "
I understand that using “WaveConfig” allows us to access the WaveConfig.cs script, but I still have not grasped why we use “waveConfig”, what it does & also where it comes from.
I’ve looked over the WaveConfig.cs script & I can’t see a “waveConfig” reference in it at all, so I’m confused as to how we’re using it in the EnemySpawner.cs script. I tried looking it up but was unsure what to look for in the Unity Docs, unfortunately.
I don’t really want to go any further in the course until I’ve got a better understanding of this, so if anyone can help me out I’d be very appreciative