I have basic game system setup of “collecting” objects by collision, and the score increases. Think of mario and coins, echo and rings, etc.
When a certain number have been collected (or countdown timer expires) how can I “stop” the level? I want stop the game and then use the HUD to put up scores, with a try again button. I know how to restart the level, I know how to pause the level, but how do I “stop”, or end the level?
“Set Game Paused” actually gives me the functionality I want other than the word “pause” on the screen. Do I just use Pause and then change the text? I am learning and would rather learn the best practice way to do this instead of a cobbled together hack I can get functional.
If using pause is what I want ok…how do I change the text / remove it?
So I have been working on it - if I use pause, the game truly pauses, and I can’t bind a key press to restart the level…so I am thinking there is something better than “Set Game Paused” that I should use?
In the following image you can see my process. When all the conditions are met, I am playing a sound, and using the HUD to show text. I then have a delay for the sound to finish, and then I pause the game. I can’t get the keypress of “p” to restart the level - I assume because the game is paused.
I am not sure, I am working on finding a good way to pause the game and work with inventory and menu screen right now. So far I am not sure what the best way to go about it is.