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 02-17-2010, 01:24 AM   #54 (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

Quote:
Originally Posted by Sesa View Post
Code:
-(void)CheckCollision {
		if (CGRectIntersectsRect(myRock.frame, Elephant.frame)) {
			alert = [[UIAlertView alloc] initWithTitle:@"Enter Some Text" message:@"" delegate:self cancelButtonTitle:@"Done" otherButtonTitles:nil];
			[alert show];
[alert realase];
		}
}
My Collision dosent work?
You have an array of rocks; you need to loop through the array and check each rock against the elephant. Something like the loop in this post:
http://www.iphonedevsdk.com/forum/ip...tml#post150018

ZunePod: newView doesn't need to be in the .h file, because it's just a temp variable we're using to create the new views. The array meteorArray should be in the .h file, though.
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,485
Threads: 94,041
Posts: 402,628
Top Poster: BrianSlick (7,978)
Welcome to our newest member, jianjue
Powered by vBadvanced CMPS v3.1.0

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