Quote:
Originally Posted by LeopardDevX
I have made a game where a ball is bouncing around and to not loose you move a paddle at the bottom of the screen,, and i have bricks to hit at the top of the screen.....
the game is working just fine....
but when i loose it pops up a uialertview and i have connected the buttons in the alert to actions.. i have a MainMenu button that takes you to MainView (which is a homemade viewcontroller)... and my other button is a retry button....,, but i dont know how to restart the level (view)...
Anybody can help??
Or post some code??
Thanks....
|
It's going to depend a lot on how you built your game. I assume when you first start the game, you have code that puts all of the blocks on the screen, puts the ball and paddle into position, and sets the score to zero?
If you put all of that code into a method called, lets say, "resetGame" , then you can use that method twice - once when you start the game, and again when they click replay.
Is there something in particular you need help resetting, like removing subviews you've added?