Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-25-2009, 01:55 PM   #2 (permalink)
smasher
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

Quote:
Originally Posted by LeopardDevX View Post
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?
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Online Users: 776
16 members and 760 guests
ADY, AngryOrange, antonwilliams, bocaraton, charles.scholten, Domele, hiddendemo, Hirley2324, ilmman, iphone.savvy, J.Steve, smarkmee, srilu, suresk, Thompson22
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,629
Threads: 89,146
Posts: 380,340
Top Poster: BrianSlick (7,110)
Welcome to our newest member, charles.scholten
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:17 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.