I am building a game that spawns an Asteroid every X seconds. My question is how do I stop that event from happening once my player dies so the screen doesn't fill up with Asteroids causing a tax on the memory and crashing the game?
Add a conditional.
For example "Player>is on screen".
Develop games in your browser. Powerful, performant & highly capable.
Ahh much thanks! Its funny how you can overlook something so obvious without having a second person point it out.