CodingTrain / asteroids-advanced

24 stars 7 forks source link

LevelManager bug #32

Open MunWolf opened 7 years ago

MunWolf commented 7 years ago

It spawns new asteroids before all of the old ones are killed.

MunWolf commented 7 years ago

As @NaveTK said, this happens because we spawn the new asteroids at the end of a frame while the LevelManager checks the number of asteroids after the last asteroid is removed but before new ones are added.