in my game, livesInt is how many lives the user has and lives is the label that displays the int. When two images collide, the livesInt is supposed to -1.
I am having trouble doing this. what i have is:
HTML Code:
if(CGRectIntersectsRect(image1.frame, image2.frame)) {
image1.center = CGPointMake(160.0, 20);
//this is where i need help:
livesInt = livesInt -1;
lives.text = [NSString stringWithFormat:@"%i", livesInt];
}