hi,
i have a problem with the function if CGRectContainsRect... i only want the score to +1 when a CGRect contains another, and i want the score to +1 only when the user has let go of the CGRect, at the moment if you drag the CGrect inside the other CGRect the score is constantly increasing, and you also don't have to let go of the CGRect, heres my code. Its very simple but i thought it would do the job, but at the moment it isn't.
- (void)touchesMoved

NSSet *)touches withEvent

UIEvent *)event {
UITouch *myTouch = [[event allTouches] anyObject];
bomb.center = [myTouch locationInView:self];
[self checkCollision];
}
- (void)checkCollision {
if(CGRectContainsRect(redzone.frame, bomb.frame)) {
[self addScore];
}
}
- (void) addScore {
{
score = score +=1;
}
scoreLabel.text = [NSString stringWithFormat:@"%d", score];
}
Thanks, haza.