Hello!
This lecture I had things that I did very differently from Rick through the challenge. My main question is, I did not use a local variable for the AttackerSpawner to know when to start/stop spawning (GetSpawn() in this example)
IEnumerator Start()
{
while (myLevelController.GetSpawn())
{
yield return new WaitForSeconds(Random.Range(minTimeBetweenSpawns, maxTimeBetweenSpawns));
SpawnAttacker();
}
}
This made it so I didn’t have multiple bools across my scripts waiting for the same thing to happen. Is there any disadvantage to doing it like this?
Thanks!