Set a bool which will tell you whether the app is running or not, and then have something like this:
Code:
- (void)restartGame {
if (gameIsRunning) {
[animations stopAnimating];
[game restart];
return;
}
else if (!gameIsRunning) {
[game restart];
return;
}
}
Quote:
Originally Posted by littlemanapps
ive added a pause function to my game, and if i 'restart' the game while it is running through the objects in an array to animate them, i receive exc_bad_access because its seems to continue running through the method it stopped on.
sorry if thats not clear.
|