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

Thread: Random Rocks
View Single Post
Old 12-08-2009, 11:45 AM   #12 (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're changing the value of count3, but you're not using it anywhere. You need to loop through the whole array, get the object for each index, and do a collision check with that object.

Code:
for (int i = 0; i< [objectsArray count]; i++){

   UIView* currentBomb = (UIView*)[objectsArray objectAtIndex:i];

   if(CGRectIntersectsRect(currentBomb.frame, wood.frame)){
       NSLog(@"Collision ");       
   }

}
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,387
Threads: 94,003
Posts: 402,459
Top Poster: BrianSlick (7,978)
Welcome to our newest member, latoncefrank
Powered by vBadvanced CMPS v3.1.0

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