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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-05-2010, 05:46 PM   #30 (permalink)
smasher
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

You already changed the if statement to "if (firstSwipe == true)" right?

It's not clear to me whether (A) firstSwipe is changing before it's supposed to; before the first swipe is detected or (B) firstSwipe is working properly, but the code for falling is being run when it should not be run because you have some other condition you want to wait for like the first jump is complete.

Do you know which one is going on? A is probably a mistake in syntax somewhere, B is a mistake in design. I'd add two NSLogs to find out which it is:

Code:
//put this at the top of your game update method;
//the one triggered by the timer.
NSLog (@"firstSwipe is : %d", firstSwipe);

//put this inside the if statement that makes you fall.
NSLog (@"falling now!");
And yes, you can loop through all of the blocks in an array with a for loop
Code:
for (UIImageView *block in stoppedBlocks){
      //do something to "block"
      //it will loop through all of the blocks in stoppedBlocks.
}
__________________

Free Games!

Last edited by smasher; 02-05-2010 at 05:48 PM.
smasher is offline   Reply With Quote
 

» Advertisements
» Online Users: 525
11 members and 514 guests
cch4d10, Domele, Hassasin, ilmman, jeiry, kasumar, nebulabox, Newbie123, sangsom, smithms, SuperDietGenius
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,446
Threads: 94,031
Posts: 402,605
Top Poster: BrianSlick (7,978)
Welcome to our newest member, larueta13
Powered by vBadvanced CMPS v3.1.0

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