Hi,
I have 2 coroutines that run to spawn enemies and powerups. When my player dies, I have a title page that displays and asks the user to press enter to restart.
What I have seen is that if I press Enter too quickly after the game ends, it restarts with enemies and powerups spawning twice as fast.
I use StopAllCoroutines() when the player dies, but I wonder if it doesn’t have time to fully execute before I start again and this could be the issue?
I would like to know if this is a common thing or I am doing something wrong? If this is common, how do you get around it? Is there a way to instantly stop coroutines? Is there a way to delay showing the title screen until coroutines have stopped? Something else?
Thank you very much,
John