Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-25-2009, 12: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: 2,547
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?
__________________
smasher is online now   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 23,872
Threads: 38,649
Posts: 169,645
Top Poster: smasher (2,547)
Welcome to our newest member, RCummi86
Powered by vBadvanced CMPS v3.1.0

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