jeremychone-channel/rust-invaders

ActiveEnemies underflow

Closed this issue · 1 comments

If all enemies are cleared before any to spawn (easy to reproduce), the ActiveEnemies underflow to u32.MAX, prevents new enemies to spawn.

struct ActiveEnemies(u32);

recording

i32 may be better.

I am following the video tutorial, clearly this is fixed in the latest code.