Quote:
Originally Posted by kdp8791
I am trying to setup a collision between the falling image and another image. I have setup the following way, but for some reason, instead of going up by 1. It's going up by different amounts like 5, 13, 4, 10, etc...for example If one image touches the other it may go 5 then it will go to 18 if touched again. But according to the code it should only go up by one.
Code:
-(void)checkcollision {
if(CGRectIntersectsRect(floatingball.frame, myRock.frame)) {
flakeCounter = flakeCounter + 1;
flakeInt.text = [NSString stringWithFormat:@"%d", flakeCounter];
}
}
|
Hey Im, Kristers and i need to make images fall from top to bottom in iPhone SDK and also collide! I saw your code but i cant understand it, can somebody please send me source code for this app that has got images falling from top to bottom and also collision working? PLEASE!
Thanks, Kristers