gbusto / BrickBreak

An attempt to make a game like "Ballz" or "Bricks and Balls".
1 stars 0 forks source link

Bug When Unpausing Game #630

Closed gbusto closed 4 years ago

gbusto commented 4 years ago

I've seen a few instances (rare) where the game will look like it unpauses by removing the pause screen but the balls and everything still remains frozen. I thought the game was lagging or that maybe it crashed, but by tapping the top bar to pause the game and tapping Resume it would finally unpause.

gbusto commented 4 years ago

It's something about when the game goes into the background. I kept putting it in the background to pause, bringing the game to foreground to unpause, and it wasn't fixing it. I had to fix it by tapping the top bar to pause then clicking Resume.

gbusto commented 4 years ago

Maybe I can do this: have a function called setPauseVariables() that will set scene.isPaused, view.isPaused to true, and a 3rd manual isPaused variable that I control. Override isPaused in the scene to catch didSet, and on setting scene.isPaused, check to see that the 3rd, manual variable is set to the same value. If it is not, manually set the pause variables to what they should be.