bmende
bmende

Reputation: 741

How would you go about pausing an iphone game?

I want to be able to pause my iphone game, and not just pause it, but basically freeze it and only unfreeze it unless the continue button is pressed. I cant just eliminate user interaction and stop all animations, because methods are constantly running on a timer. Imagine a shoot em up with enemies, how would you pause that type of game?

Upvotes: 0

Views: 135

Answers (1)

zoul
zoul

Reputation: 104065

There should be a main game loop in your game that essentially measures the time delta from the last update, updates the game state according to the delta and redraws. When this loop stops spinning, the game is paused. Timer is not really different from the main loop solution, just pause the timer and you have paused the game.

Upvotes: 3

Related Questions