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 03-19-2010, 04:33 AM   #75 (permalink)
iSdkDev
Registered Member
 
Join Date: Oct 2009
Location: India
Posts: 11
iSdkDev is on a distinguished road
Default @Smasher Collision Problem

@SMASHER OR ANY1ELSE "Ok soo i did this code and i have those images falling but there's a bug!I have a label that turns to 1 from 0 when that falling image collides with an image below BUT there is a bug when i starts falling down it just automatically adds 1 to my label where as i want tht 1 to add only when it collides!!Please help"
Here is the code

Quote:
-(void) move {
banana.center = CGPointMake(x, banana.center.y + 1.7);
if (banana.center.y > 480) {
[self performSelector:@selector(change)];
}

banana2.center = CGPointMake(x1, banana2.center.y + 2.0);
if (banana2.center.y > 480) {
[self performSelector:@selector(change1)];
}



banana4.center = CGPointMake(x3, banana4.center.y + 0.3);
if (banana4.center.y > 480) {
[self performSelector:@selector(change3)];
}


if(CGRectIntersectsRect(cloud.frame, banana.frame)) {


[self performSelector:@selector(change)];

mainInt += 1;
label.text = [NSString stringWithFormat:@"%d" , mainInt];
[self performSelector:@selector(UpdateINT)];


}}
iSdkDev is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,545
Threads: 94,069
Posts: 402,689
Top Poster: BrianSlick (7,989)
Welcome to our newest member, ceolacc18
Powered by vBadvanced CMPS v3.1.0

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